Last modified: 2013-03-06 05:36:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29933, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27933 - CSSMin should automatically add vendor prefixes for CSS3 properties
CSSMin should automatically add vendor prefixes for CSS3 properties
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-08 13:00 UTC by Liangent
Modified: 2013-03-06 05:36 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2011-03-08 13:00:45 UTC
So when I write border-radius: 20px;, -moz-border-radius: 20px;, -webkit-border-radius: 20px; etc. will be added automatically.
Comment 1 Trevor Parscal 2011-03-08 18:36:31 UTC
What's the proposed behavior when such private rules already exist neaby?

I think figuring out ways to make development easier is clever and useful, but we have to be careful because we process CSS from libraries like jQuery UI, or other jQuery plugins all the time, and we need to not make assumptions about their code. Also, given that, what you are proposing might possibly require parsing to do right (not 100% sure, but I suspect it might) and parsing CSS is another tricky business because of CSS hacks being used in said libraries.
Comment 2 Trevor Parscal 2011-03-08 18:39:46 UTC
I was going to also point out, that there are libraries like  SASS, xCSS, and Less that do meta CSS programming. Because these start from a more sanitary source, they can do tricky things. If there's a PHP implementation of one of these that we like, we could consider adding that to core and supporting that as a style format. ResourceLoader could notice by inference or be told by configuration that the style needs to be processed using X algorithm, and all should be well. It could be used as a pre-processing step, so existing minification, URL remapping and image embedding would still work.
Comment 3 Bugmeister Bot 2011-08-19 19:12:58 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 4 Antoine "hashar" Musso (WMF) 2012-01-13 09:59:52 UTC
Less has a javascript implementation. So you can just:

 <link rel="stylesheet/less" type="text/css" href="styles.less">
            ^^^^^^^^^^^^^^
 <script src="less.js" type="text/javascript"></script>

The javascript will handle all the magic for you http://lesscss.org/
Comment 5 Bartosz Dziewoński 2012-11-11 15:22:52 UTC
See bug 40964 for Less/SASS/whatever support and why it probably can't be implemented right now.

The second point from bug 40964 comment 1 applies here as well: "There is currently (for debug, among other reasons) the paradigm that the post-processor only enhances scripts/styles, never as a requirement for it to be functional. So in the current way of things, any pre-processor wouldn't be an option.".

Additionally, for some CSS properties (for examples ones related to gradients) the -prefix- syntax is different than the final, accepted one; we can't blindly add the prefixed properties every time.

And also, the usefulness of this would IMO be quite minimal.

Therefore I suggest WONTFIXing this bug.
Comment 6 Krinkle 2013-03-06 05:36:13 UTC
I agree with WONTFIX:

* The vendor prefixes might have different syntax
* This is beyond optimisation of code and actually adds functionality, this is something for a a more advanced and explicit pre-processor (e.g. SASS, LESS), not something to silently add during minification.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links