Comments (9)
In general, manually coding vendor properties is probably a smell. You should be using a framework like https://github.com/chriseppstein/compass so that you never need to think in terms of vendor-specific prefixes. Writing something like
@include border-radius(10px);
Is so much nicer than the alternative boilerplate multi-line declaration.
Having said that, you may have very good reasons for needing to manually write vendor prefixes. It sounds like the underlying problem is you are writing SCSS properties with interpolated names, e.g.
-#{$some-prefix}-#{$stuff}: $some-value;
It seems reasonable to me to simply ignore the sorting of properties that contain interpolated Sass script, since their names are dynamically evaluated.
Any thoughts?
from scss-lint.
I totally agree with you there,
some parts of our site us the -ms-filter
and filter
properties though, to support specific things in IE.
from scss-lint.
Perhaps I'm misunderstanding (or just lacking context), but is there a strong reason you can't use Compass' cross-browser filter implementation? http://compass-style.org/reference/compass/css3/filter/
We don't make significant use of that particular mixin, so I'm not sure of valid situations where you really need to manually write vendor-prefixed properties, but in general it feels like you should always use a Compass mixin where possible.
Sorry if I seem to be hammering the same point, I just want to make sure there's a real need here. Thanks for keeping the dialog going.
from scss-lint.
There's also this
http://leaverou.github.io/prefixfree/
Todd Zaki Warfel
[email protected]
(415) 379-0045
On Jun 6, 2013, at 5:34 PM, Shane da Silva [email protected] wrote:
Perhaps I'm misunderstanding (or just lacking context), but is there a strong reason you can't use Compass' cross-browser filter implementation? http://compass-style.org/reference/compass/css3/filter/
We don't make significant use of that particular mixin, so I'm not sure of valid situations where you really need to manually write vendor-prefixed properties, but in general it feels like you should always use a Compass mixin where possible.
Sorry if I seem to be hammering the same point, I just want to make sure there's a real need here. Thanks for keeping the dialog going.
—
Reply to this email directly or view it on GitHub.
from scss-lint.
@zakiwarfel prefixfree doesn't isn't related in this context, I'm talking about the very specific IE filter properties.
from scss-lint.
@sds that isn't the same thing. that is for supporting the new CSS3 filter features.
from scss-lint.
@sds I am really interested in using scss-lint full time, for all of my code, and I think the reason I've been hitting so many edge cases is because I truly use almost, if not all the features scss allows.
I really like what you guys are doing, and I will continue to submit bug reports as they come across.
you guys have been very awesome with response time as well. so 🍻 for you guys.
from scss-lint.
After talking this over with a few members of the team, including our in-house CSS expert, we'll probably end up implementing something different than a straight-up ignore of vendor-specific properties.
Instead, what we felt was possibly worth implementing was a lint that enforces that all vendor-specific prefixes come before their non-prefixed form, sorted in alphabetical order of the prefix. For example, we'll enforce the following order:
border: 0;
-moz-border-radius: 3px;
-o-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #ccc;
...where we do the regular alphabetical ordering of properties, but when the property is vendor-specific we'll make sure that the final non-prefixed property is the last in the list.
@lifeiscontent, does this seem reasonable to you?
from scss-lint.
@sds this is exactly the solution I would invision, great call 👍
from scss-lint.
Related Issues (20)
- Ruby version 3.2.0 HOT 3
- Extend separate_groups options in PropertySortOrder
- gem "scss-lint" installs scss-lint-0.38.0 HOT 1
- Single control comment does not work in at least one edge case HOT 1
- scss-lint output newscss HOT 1
- PseudoElement does not work with ::placeholder property HOT 2
- Feature Request: Reused Classname/Html name throws errors
- HexValidation - Allow 4-digit hex values HOT 1
- Exclude files instead of disabling linter when generating config HOT 1
- How to exclude node_modules? HOT 1
- Document multiple exclude globs
- scss-lint not compatible with IntelliJ IDEA Educational Edition 2019.3 x64 HOT 2
- Support --fix like eslint --fix to autofix whitespace related formatting lint issues HOT 1
- sass-lint is unmaintained HOT 2
- Request: add scroll-margin property to default whitelist HOT 2
- Make it possible to define required line breaks before blocks and modifiers in BEM notation
- Problems with scrollbar-color HOT 1
- Unknown property warning for 'gap' and 'row-gap' HOT 1
- Properties `text-underline-offset` and `text-decoration-thickness` false-positives
- ::marker should be valid
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 scss-lint.