Skip to content

CSS variables and @media queries #25703

Description

@iatek

According to the docs... https://getbootstrap.com/docs/4.0/getting-started/theming/#examples

"You can also use our breakpoint variables in your media queries"

Example:

.content-secondary {
  display: none;
}

@media (min-width(var(--breakpoint-sm))) {
  .content-secondary {
    display: block;
  }
}

But, from what I can see this doesn't work. I've also found evidence that var() doesn't work with media queries at all: https://stackoverflow.com/questions/40722882/css-native-variables-not-working-in-media-queries

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions