Comments (4)
Oof, this is pretty rough. I see two feasible solutions here:
-
Keep the behavior as-is, and continue parsing
//
as an inline comment wherever it appears. This violates our core design principle of CSS compatibility. -
Parse
//
in an expression context as a slash-separated list with an empty value in the middle. This would be hugely backwards-incompatible, since//
is already widely used in expression contexts to begin a single-line comment.
Either one of these is very bad. I'll talk to some CSSWG folks about this, but my initial inclination is to go with option 1, and say you must include the space between the slashes in Sass. The migration cost for option 2 would be quite substantial, and we're already asking a lot of our users with the /
-as-division migration and the module system migration.
Separately, this means we'll need to do two more things:
- Update the
/
-as-separator spec to support empty elements. - Update the plain-CSS parser to support
//
in expression contexts.
from sass.
Yes, border-image
is the only property with this issue currently (and likely in the future as well). However, Sass has a strong design commitment to referential transparency: the principle that writing an expression or writing a variable that contains that expression both behave the same way. If we say that border-image: 1//2
has one behavior and $border-image: 1//2; border-image: $border-image
has another, that not only breaks user expectations in that particular instance it undermines their faith in their ability to reason about the language as a whole.
from sass.
Is border-image
the only CSS property whose value can contain //
? If yes, then maybe Sass could implement a special rule for when //
appears after border-image
on the same line, if that’s possible.
(border-image
is defined at https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image)
edit: I remembered that the value is not necessarily on the same line. That complicates things.
from sass.
Is
border-image
the only CSS property whose value can contain//
? If yes, then maybe Sass could implement a special rule for when//
appears afterborder-image
on the same line, if that’s possible.(
border-image
is defined at https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image)edit: I remembered that the value is not necessarily on the same line. That complicates things.
As far as I know it's the only one but maybe we can have more properties in the future.
from sass.
Related Issues (20)
- How to use $each to set variables HOT 1
- Compatibility with the CSS custom function and mixin proposal HOT 6
- Allow two underscores on index files __index.scss HOT 1
- Node.js Package Importer shouldn't be strict about require.main.filename
- Sass is converting var(--c,) into var(--c) which leads to wrong code HOT 4
- Suggestion: Improve documentation around CSS Layers HOT 6
- Handle semicolons as function separators HOT 1
- Support an optional modulus argument to the round() function
- & selector in SCSS and CSS behaves differently HOT 2
- Please remove "free alestine" banner
- Please remove "free Palestine" banner HOT 2
- what is the relation between politics and css? remove that free Palestine immidiatly
- Multi asign, list deconstruction and better support for multiple returns HOT 2
- Generate deprecations list from a single source-of-truth
- Include loaded URLs in failed compilation result HOT 3
- Explicitly allow a base importer without a base URL HOT 1
- Remove FREE Palestine immediately from your site!!!!!!
- Remove FREE Palestine immediately from your site!!!!!!
- Remove FREE Palestine immediately from your site!!!!!!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sass.