Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !32936

Support for prefers-color-scheme media query

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/vinorodrigues/main into main Jan 30, 2021
  • Overview 9
  • Commits 24
  • Pipelines 0
  • Changes 66

Created by: vinorodrigues

This pull request seeks to offer the beginnings of a solution to issue #27514 (closed).

Following a conversation with @mdo (and @ffoodd) on his personal AMA I decided to attempt to merge my experimentations with Dark Mode in my bootstrap-dark-5 project, that in turn was just an add on to my bootstrap-dark ramblings.

This submission is a very specific iteration of those works wherein I attempt to merge a pure prefers-color-scheme: dark media query driven “Dark Mode” as a 5th variant of the CSS. That means no toggle button etc., but easily attainable with one line setting in the _variables.scss file and a whole lot of JS to drive that. (I can contribute to building that a bit later.)

This work, and the original works, would not have been possible without the advice of Thomas Steiner (@tomayac) and his prefers-color-scheme: Hello darkness, my old friend blog post. Reading that (and his color-scheme CSS property post) and some of @mdo’s work inspired the original text.

It includes both the SCSS changes and the docs to go along with it.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/vinorodrigues/main