by jchampem on 5/23/16, 9:26 AM with 112 comments
by mrgreenfur on 5/23/16, 2:47 PM
by hashkb on 5/23/16, 1:47 PM
by roddux on 5/23/16, 11:43 AM
Which is worse; when it's done as satire, or seriously?
by steego on 5/23/16, 2:03 PM
by nachtigall on 5/23/16, 11:31 AM
> Now that we’re writing almost all of our html in modular fashion, I have found mix-n-matching pre-defined css classes works the best. i.e. class=”inline-block bg-bbb text-333 padding-5-15″
by aplummer on 5/23/16, 10:18 AM
by ojii on 5/23/16, 10:22 AM
by yAnonymous on 5/23/16, 11:06 AM
by smhenderson on 5/23/16, 2:53 PM
View Raw
(Sorry about that, but we can’t show files that are this big right now.)
by chrismonsanto on 5/23/16, 11:45 AM
See also the latest reprinting of "A Modest Proposal," which kindly has "SATIRE -- DO NOT BELIEVE" in large caps on the front and back covers.
by usmanshaikh06 on 5/23/16, 10:40 AM
Of course it's a joke. Use semantic CSS class names.
by YngwieMalware on 5/23/16, 5:06 PM
by ryannevius on 5/23/16, 10:54 AM
by blowski on 5/23/16, 12:10 PM
1. Bootstrap is partly for prototypes and quick interfaces where front end best practices don't matter.
2. If you're using a preprocessor, you can include Bootstrap's classes and rename/combine them to something semantic.
3. Something can be a good idea when done in small quantities, and a terrible idea when taken to extremes.
by sunnyshahmca on 5/23/16, 12:49 PM
by binthere on 5/23/16, 3:14 PM
by megalodon on 5/23/16, 10:50 AM
by kevinyun on 5/23/16, 4:28 PM
by lanestp on 5/23/16, 2:14 PM
by Randgalt on 5/23/16, 11:59 AM
by leray_J on 5/23/16, 3:46 PM
by return0 on 5/23/16, 2:11 PM
by jjar on 5/23/16, 4:02 PM
by thierryk on 5/23/16, 4:04 PM
No, it is not the same as using "inline styles" (just think about it). Yes, it reduces CSS scope and bloat in styles sheets. Yes, it breaks the Separation of Concern principle. No, it does not create bloat in the markup. Yes, it forces you to style via markup rather than via a style sheet, etc.
Like with any other technique, choosing to use "Atomic CSS" in a project should be considered in relation to the problems authors have to solve. CSS is a complex matter, there is no one size-fit-all solution and there are not that many solutions either so I think we should think twice before disregarding a tool, any tool.
PS: Yes, I know universal.css is a joke but it is mocking a real/serious approach to big CSS problems.
by Loque on 5/23/16, 4:31 PM
Utility classes I dislike (mixins plx) and the idea of using important with them is not a design decision I would want to pick up.
I guess my bigger problem is that Harry sells himself as an expert, stands up on stage telling people this is how they should be doing things... and here I am, no book, no stage and my specificity level gets trumped by Harry amongst certain members of my team (despite my years of qualified awesomeness across large scale, popular, public domain sites)
Thought I'd just share that with you :`P
by yuvalkarmi on 5/23/16, 1:43 PM
by kalkin on 5/23/16, 3:14 PM
I mean, nobody actually advocates translating every single possible style attribute into its own CSS class. But what's wrong with padding and margin utility classes that use a consistent set of widths? Is doing calculations on "1x" and "2x" when you want elements to line up really worse than doing calculations on pixel or em values in your CSS just because it's "unsemantic"?
Let's take the examples from the "maintainable CSS" book that's linked:
<!-- bad [sic] -->
<div class="red pull-left">
<div class="grid row">
<div class="col-xs-4">
<!-- good [sic] -->
<div class="header">
<div class="basket">
<div class="product">
<div class="searchResults">
Ask yourself, in which case can you read the code and tell roughly how it's going to render? In which case do you think you'll be able to re-use the classes on other pages? If you wanted to make another, visually consistent page that shows, say, seller search results instead of product ones, in which case do you think you'll be able to figure out which styles need to change more quickly?Here's the backend equivalent:
# "bad"
def cheapest_products_with_min_rating(rating)
products.
select { |p| p.rating >= rating }.
sort_by { |p| p.price }.
first(10)
end
# "good"
def products_for_category_landing_page(rating)
allowed = []
for p in products
if p.rating >= rating
allowed << p
end
end
# pretend I've implemented quicksort here
result = []
for p in sorted
break if result.length >= 10
result << p
end
result
end
Ugh, that first example - using all these "unsemantic" components like "sort" and "select"! How do I know when I look at the implementation of any of them, or the function itself, what the intent is? What business problem is being solved?The second example - so nice and "semantic". If we want to change what products show up on the category landing page, it will be easy!
...
In real life, nobody writes backend code like that. Why should we tolerate it in the frontend?
by rudedogg on 5/23/16, 2:22 PM
by Kmaschta on 5/23/16, 10:39 AM
by cfvergara on 5/23/16, 1:13 PM
by mat_jack1 on 5/23/16, 8:04 PM
I sympathize with the other commenters with my same problem.
by mendelk on 5/23/16, 6:10 PM
To each their own, I guess.
by chrispie on 5/23/16, 2:42 PM
by drivingmenuts on 5/23/16, 6:42 PM
by nkjoep on 5/27/16, 12:43 PM
by babby on 5/23/16, 10:32 AM
by syzygykr on 5/23/16, 11:47 AM
by foota on 5/23/16, 4:51 PM
Uh oh
by typedef_struct on 5/24/16, 2:10 AM
by cloudjacker on 5/23/16, 5:13 PM
whew, had me going there
by surunzi on 5/23/16, 2:23 PM
by bingeboy on 5/23/16, 6:43 PM
by mobiuscog on 5/23/16, 12:02 PM
by dikiaap on 5/23/16, 2:16 PM
by fortytw2 on 5/23/16, 10:50 AM
What constitutes self-describing code is wildly different depending on the person. I mean, really?
EDIT: I definitely missed that this is a joke :'(
by jstoja on 5/23/16, 10:21 AM
by fiatjaf on 5/23/16, 12:40 PM
I have a lot of ideas for small side projects that could be good (or probably not, but at least I wanna try them seriously) and can't get time to implement them, and people who have this time waste it writing universal.css.
by smegel on 5/23/16, 12:24 PM
No thanks.
Honestly I thought bootstrap was the only css I would ever need, and this hasn't changed my mind.