Earlier quoted context omitted.
Less has the same feature: http://lesscss.org/features/#extend-feature
Thank you so much for pointing this out, Moretti! It drives me crazy when people talk about the extend feature like only SASS has it. People are always underestimating how similar Less and SASS are.
Using Bootstrap the Semantic Way
41–50 of 71 posts
Re: Using Bootstrap the Semantic Way
#42Earlier quoted context omitted.
You will start caring the day you want to update to Bootstrap 9000 and need to change the class names of all the properties that have changed. A counterargument could be that one could stick with the version already deployed, and that's fine too I guess. For me it's about being in control of the situation. I will find myself changing things just for them to look as they are supposed to look like, and soon realizing t…
Bootstrap already depends on the markup structure, which makes your point moot.
Re: Using Bootstrap the Semantic Way
#43Perhaps if I were building a CMS or some other document-oriented site I would approach things differently.
Re: Using Bootstrap the Semantic Way
#44Earlier quoted context omitted.
Alternatively use SASS (and the bootstrap SASS port[1]) which doesn't has this problem, as it instead rewrites selectors. i.e. if you have: .column { width: 100px; display: inline-block; } And you do: .cool-sidebar { @extend .column; } Then the generated css will be something like: .column, .cool-sidebar { width: 100px; display: inline-block; } [1] https://github.com/twbs/bootstrap-sass
Less has the same feature: http://lesscss.org/features/#extend-feature
.foo-class {
&:extend(.col-md-4, .col-md-offset-8)
}
instead of using the mixin? .foo-class {
make-md-column(4);
make-md-column-offset(8);
}Re: Using Bootstrap the Semantic Way
#45Build the CSS for your next project using mixin libraries like Bourbon/Neat or Compass/Susy. You'll be glad you did.
Re: Using Bootstrap the Semantic Way
#46We need a better word for this than "semantic". We're just passing the complexity back and forth between the HTML and the CSS, and the only "semantics" or meaning that arise are to the author/editor. Users don't care, machines don't care, and I've never, ever seen a large-scale site design that doesn't involve some reworking of both the HTML and the CSS.
Re: Using Bootstrap the Semantic Way
#47Earlier quoted context omitted.
That's no rebuttal, just an opinion. Oh we got this huge app and are to lazy to do everything properly.
I'm not convinced you read the link, rather than just the bits I quoted. Also, laziness is one of the three great virtues of a programmer according to Larry Wall. People are getting things done with Bootstrap every day.
That is not an argument for correctness of approach. If there arose a cult of builders who decided to pour foundations with wheelbarrows and bags of concrete rather than a mixer, I'd tell them they're doing it wrong no matter how many houses they built this way.
Re: Using Bootstrap the Semantic Way
#48The point of using bootstrap is a reusable set of classes. I really dont care wether class names are semantic or not,it doesnt change anything,except for pedantic people looking at your source code. SEO doesnt care , users dont care, accessibility doesnt care either. Using new HTML5 tags is good enough and was designed for that specific purpose. If i want semantics I use nav,aside,section instead of div,and so on. No…
Couldn't disagree more with your statement. What if you have a sidebar that appears 20+ times throughout your application in different contexts. You might decide it is too wide. Are you going to go through all your templates and change class="col-md-blah" or are you going to change one mixin? Also, if you are providing a theme, I don't see how you lose portability. Your mixins will be relying on base bootstrap anyway…
Re: Using Bootstrap the Semantic Way
#49Earlier quoted context omitted.
I'm not convinced you read the link, rather than just the bits I quoted. Also, laziness is one of the three great virtues of a programmer according to Larry Wall. People are getting things done with Bootstrap every day.
> People are getting things done with Bootstrap every day. That is not an argument for correctness of approach. If there arose a cult of builders who decided to pour foundations with wheelbarrows and bags of concrete rather than a mixer, I'd tell them they're doing it wrong no matter how many houses they built this way.
With the cult of semantic HTML, the flaws in using class names to describe presentation are almost always not explained beyond some vague notion of "correctness", and possibly an example that bears to relation to reality when you take into account that almost all HTML is being generated by some sort of templating engine anyway.
Re: Using Bootstrap the Semantic Way
#50Earlier quoted context omitted.
no, but or are semantic, and there's no reason you couldn't use those instead of by using the features of LESS or SASS.
That still wouldn't be semantic. Their only reason for existing is for layout. If html/css were semantic you could write all of your html first without thinking about style or layout and then go do the css after, but that's simply not possible today.