Skip to content

process code in @supports queries with cascade: false #1200

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

Merged
merged 1 commit into from
Mar 7, 2018

Conversation

leereamsnyder
Copy link
Contributor

@leereamsnyder leereamsnyder commented Mar 4, 2018

with the cascade: false option, CSS in @supports blocks was getting removed

<div class='maybe-grid'>something with a nice layout</div>

<style>
  @supports (display: grid) {
    .maybe-grid {
      display: grid;
    }
  }
</style>

You would expect to get the code within the block e.g.

@supports (display: grid) {.maybe-grid[svelte-xyz]{display:grid}}

but you would get

@supports (display: grid) {}

with the cascade: false compiler option, CSS in @supports blocks was getting removed
@codecov-io
Copy link

codecov-io commented Mar 4, 2018

Codecov Report

Merging #1200 into master will increase coverage by 0.05%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1200      +/-   ##
==========================================
+ Coverage   91.63%   91.69%   +0.05%     
==========================================
  Files         127      127              
  Lines        4567     4573       +6     
  Branches     1503     1505       +2     
==========================================
+ Hits         4185     4193       +8     
+ Misses        160      158       -2     
  Partials      222      222
Impacted Files Coverage Δ
src/css/Stylesheet.ts 91.2% <71.42%> (+1.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8aaf92a...cbdbff5. Read the comment docs.

@Rich-Harris
Copy link
Member

Excellent, thank you!

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.

3 participants