Skip to content

Replace all variables #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Replace all variables #5

wants to merge 1 commit into from

Conversation

ooflorent
Copy link

Allow multiple substitutions by @media definitions.

@media (--xs), (--sm) {
  body {
    font-size: 20px;
  }
}

@necolas
Copy link
Contributor

necolas commented Sep 30, 2014

Is that part of the draft spec?

@ooflorent
Copy link
Author

Well, it seems...

I think we need a real CSS expert to answer that.
I have read the specs multiple times and I'm unable to find a valid answer.

EDIT: Since the <custom-media> is basically a <media-query-list> and <media> too, I think it should be correct.

@MoOx
Copy link

MoOx commented Sep 30, 2014

I am sure it is.
Imagine if we can not do the following @media print, (--viewport-whatever).
Maybe @tabatkins can confirm ?

@ooflorent
Copy link
Author

You can specify multiple <media-condition> but the spec does not clearly answer if an <expression-name> can be used in a <media-query>.

@tabatkins
Copy link

What's unclear? The spec says that an <extension-name> can be used as a media feature in a boolean context, and its true/false status is well-defined. It's not a direct textual substitution; you're literally defining a new media feature, which happens to be defined by reference to a <media-query-list>.

MoOx added a commit to csstools/postcss-custom-media that referenced this pull request Oct 1, 2014
@chikamichi
Copy link

👍 This would make it easier to handle composition of stacking constraints (width + orientation + types…)

@marioestrada
Copy link

Any reason why this hasn't been merged? This limits the functionality of this plugin and adds more burden to developers having to create new custom media queries to workaround this limitation.

@MoOx
Copy link

MoOx commented Jul 22, 2015

Maybe you should check https://github.com/postcss/postcss-custom-media ;)

@marioestrada
Copy link

@MoOx I did! But it's not that simple to move one huge project to postcss

@marioestrada
Copy link

@MoOx ok we finally migrated to postcss :)

@ooflorent
Copy link
Author

Nevermind. We moved to postcss.

@ooflorent ooflorent closed this Dec 18, 2015
romainmenke pushed a commit to csstools/postcss-plugins that referenced this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants