bug: Invalid @supports syntax in icon.css breaks under strict CSS parsers (e.g. Lightning CSS)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css
- Domain
- frontend
Research direction
Open icon.css and locate the @supports rule shown in the issue. Update its condition to use the explicit grouping described in Expected Behavior, then run the Lightning CSS reproduction or swap in stencil/core 5.0.0-alpha.35 and run npm run build to confirm the stylesheet parses successfully.
Written by the indexing model from the issue text.
Description
Current Behavior
icon.css has:
@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])) {
:host(.icon-rtl) .icon-inner {
transform: scaleX(-1);
}
}
Per the CSS Conditional Rules spec, not and and can't be mixed in a <supports-condition> without explicit parens grouping each operand.
Whilst PostCSS allowed this formatting, Lightning CSS (used in the upcoming stencil v5 release) fails with: Unexpected token Ident("and")
Expected Behavior
@supports (not selector(:dir(rtl))) and (selector(:host-context([dir='rtl']))) {
Steps to Reproduce
const { transform } = require('lightningcss');
transform({
filename: 'icon.css',
code: Buffer.from(`
@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])) {
a { color: red; }
}
`),
});
// throws: Unexpected token Ident("and")
Alternatively, swap in stencil/core 5.0.0-alpha.35 in the main ionic repo and run npm run build
Code Reproduction URL
No response
Additional Information
No response
- Dominant language
- TypeScript
- Stars
- 18.2k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ionic-team/ionicons
-
icon request: PillOpentriage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ionic-team/ionicons#1516 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ionic-team/ionicons#1510 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ionic-team/ionicons#1507 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ionic-team/ionicons#1506 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ionic-team/ionicons#1492 · 2 comments ·
All issues in ionic-team/ionicons
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
inu-appcenter/memorIN-frontend#106 ·
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 7 days
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CSCfi/sd-search-ui#145 ·
Maintainers usually reply within 1 day
-
Add: Cbeebies pl SDOpencheck:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day