3 ms·
This is no different than a few hundred CSS frameworks I have looked at over the last year. In fact it's actually worst than most: - The 12-column grid was a g
by matt4077 10y ago
This is no different than a few hundred CSS frameworks I have looked at over the last year. In fact it's actually worst than most:
- The 12-column grid was a great tool when it was first used about 10 years ago, but it's limiting creativity and no longer necessary if...
- ... you use flex, which this framework doesn't. Flex is now supported in 97% of installed browsers (http://caniuse.com/#search=flex http://caniuse.com/#search=flex) and I'd guess those 3% will actually be quite scared if any website actually worked for them.
- Whenever someone sees a for-loop in a template they start a 10-paragraph rant about separation of concerns. But nobody bats an eye at <div class="col-md-2"> even though css was invented to separate content from presentation.
It's really easy to do semantic markup these days and style it without repetition. Use semantic tags like <main>, <article>, <aside>, <nav>, etc. This is usually enough, especially using the power of targeting tags based on their position&context in the document tree, i. e. :first-child & friends. If unavoidable, use semantic class names (article class="editorial") and future-self will thank current-self for making the CSS so easy to read.
Positioning happens with a display:flex on the container and a flex: x x x on the children. Stuff like class="col-s-4 offset-xs-3" was only invented because each of these rules required multiple lines of CSS hacks and workarounds.
Even if that fails, use the 45-step build pipeline you've running anyway and use some preprocessing to pull those hacks into a class via @mixins.
- kbr 10y agoSad to hear that its bad, thanks for the feedback! Wing is slowly transitioning into using Flexbox, I am well aware of it and the growing compatibility, but most people would like for it to work on IE 9+, which is why I use the normal grid. I'm not sure about you, but the grid comes in pretty handy sometimes, I agree that there are simpler solutions, and I'm implementing those in Wing. CSS is slowly evolving, Wing is meant to be there as a boilerplate, similar to Skeleton. As the features of CSS grow, such as Flexbox and the grid, Wing will slowly no longer be needed. If you would like, you can help make Wing better by contributing at https://github.com/KingPixil/wing https://github.com/KingPixil/wing It would be really helpful, and Wing can become better and better.
- kbr 10y agoUPDATE: I have added basic flexbox usage in the utilities, such as vertical/horizontal align.