Skip to content
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

Puts @font-face and @-ms-viewport at root of CSS #805

Closed
wants to merge 1 commit into from

Conversation

Xegyn
Copy link

@Xegyn Xegyn commented Dec 22, 2014

A nested bootstrap sass import produces invalid CSS.

.bootstrap-styles {
  @import "bootstrap.scss";
}

allows you to contain all the bootstrap styles, except it nests @font-face and @-ms-viewport, which need to be declared at the root.
I understand that this is a straight conversion from less, but since less doesn't support @at-root, this seems to be the best place to do this.

@glebm
Copy link
Member

glebm commented Jan 8, 2015

This is valid, but needs to be done at the converter level

@glebm glebm added the bug label Jan 8, 2015
@glebm
Copy link
Member

glebm commented Jan 8, 2015

Turns out nested @font-face is valid CSS. Not sure about -@ms-viewport.

@Xegyn
Copy link
Author

Xegyn commented Jan 8, 2015

Sorry, could you clarify where it says that @font-face is valid? I couldn't find it in the link. I also couldn't get a nested @font-face to validate on http://jigsaw.w3.org/css-validator/
I will take a look at the converter. Thanks!

@cvrebert
Copy link
Collaborator

@glebm Where in that issue do they say it's valid CSS?

@glebm
Copy link
Member

glebm commented Apr 27, 2015

They don't, I must have misread something. Looking at mozilla docs, @font-face can be nested only inside conditional group at-rules. So I think we should indeed wrap these with @at-root.

glebm added a commit that referenced this pull request Apr 27, 2015
@glebm glebm closed this Apr 27, 2015
@fofr fofr mentioned this pull request Jun 18, 2015
ElMassimo pushed a commit to SolarCS/bootstrap-sass that referenced this pull request Apr 11, 2017
ElMassimo pushed a commit to SolarCS/bootstrap-sass that referenced this pull request Apr 11, 2017
As of version 3.3.5, the @at-root sass feature has been introduced:
twbs#805
twbs@2579e33

This feature depends on sass >= 3.3.

* Bump minimum sass version
* Remove sass 3.2 gemfile and update tests

See also:
twbs#920
bluedone added a commit to bluedone/bootstrap-rubygem that referenced this pull request Jun 6, 2023
As of version 3.3.5, the @at-root sass feature has been introduced:
twbs/bootstrap-sass#805
twbs/bootstrap-sass@2579e33

This feature depends on sass >= 3.3.

* Bump minimum sass version
* Remove sass 3.2 gemfile and update tests

See also:
twbs/bootstrap-sass#920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants