Comments (8)
Nope, that's something I'm working on which will eventually have support either via browser vendors/w3c or preprocessing.
from oocss.
Ok. Thanks for quenching my curiosity.
IMHO this is certainly worth mentioning in your FAQ to prevent any confusion. Or, at least as a comment in the CSS-file right after the selector containing the extends-rule. Maybe: "/* 'extends:' is a possible future CSS feature */" or something of a similar meaning.
Do you have a draft or suggestion for its rule definition the same way W3C has?
/Jimmy
from oocss.
Thought I'd mention I've added this ability, using this syntax, to my CSS preprocessor - http://github.com/anthonyshort/csscaffold/tree/master
It allows one selector to take on all the properties of another selector in all instances.
from oocss.
@anthonyshort the rendered result would be the same but the problem is that your preprocessor creates (x * y - x) lines/rules of overhead when
x = number of lines/rules the definition has you want to include with 'extend:'
y = number how often you use 'extend:'
to be correct you have to add y rules/lines in the end because 'extend:' is one too.
from oocss.
The overhead is very little, as it compresses/optimizes the css at the end, so duplicate selectors, like what could be created with 'extends', would be merged. For the selectors it can't merge, gzipping should take care of the rest of the overhead.
from oocss.
but you dont have duplicate selectors... you have duplicate properties or? (im not quite sure how you implemented that)
the only style of writing css that could remove duplicate properties is the one-property-per-line style as google uses it.
from oocss.
@mklappstuhl I've written up how I think this should work here: http://www.slideshare.net/stubbornella/css-wish-list
@anthonyshort Ideally this would be in the browser, a significant portion of users have gzip disabled (often due to antivirus software), so relying on compression isn't enough.
In a preprocessor, extends adds a new selector string at the same place in the code as the rule being extended. This means you can make use of CSS built in comma delimited selector string to share rulesets. Only a small portion of the code is duplicated.
from oocss.
Closing this as I've removed that bit of code, we can move any discussion to the google group going forward.
from oocss.
Related Issues (20)
- in oocss-sass, there is a mention of node.js. what is the role of node.js over there? HOT 1
- Cascade Framework and OOCSS HOT 10
- Change Repo Website
- build issue - vm stuck on lucid32 login prompt HOT 1
- Grids_gutter.css how to use them? HOT 2
- User wants to modify the port in their dev environment HOT 2
- Links in table of content in oocss/README.md are not linked correctly
- Old plain css files HOT 2
- Generated CSS HOT 3
- grids depend on a missing box-sizing mixin HOT 1
- Media Object wiki page missing
- demo site is broken
- Basic questions regarding classes and selectors HOT 1
- Missing doc css after make build HOT 1
- ssh auth returns Error: Connection timeout. Retrying...
- https://dl.dropbox.com/u/558452/vagrant/package.box HOT 9
- Can't find template.html
- use vagrantcloud
- mistakenly added
- Typo Github should be GitHub in Wiki HOT 1
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 oocss.