w3c / w3c/csswg-drafts

[css-cascade-5] imported layers syntax : quotes or not?

Open
#9,716 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-cascade-5
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

According to specs, a Layer name in an @ import file should be written without quotes : @import url(bootstrap.css) layer(bootstrap); (example 27 and others)

However, browsers support seems different upon using quotes or not :

  • @import url("...") layer(bootstrap); (without quotes) : not OK on Chrome, Firefox, Safari (only tested on Mac)
  • @import url("...") layer("bootstrap"); (with quotes) : OK on Chrome, Firefox, Safari (only tested on Mac)

See a live example :

https://codepen.io/raphaelgoetter/pen/ExrJBgb?editors=1100

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CSS Cascade 5 layer names section linked in the issue, then reproduce the quoted and unquoted forms in the linked CodePen across the reported browsers. Compare the observed parsing behavior with the specification examples; the issue is done when the syntax discrepancy is resolved or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.