Shoelace.css – A back to the basics CSS starter kit
shoelace.style
shoelace.style
It's only 12K minified and it includes everything you've come to expect from Bootstrap (that's now 120K minified). As a bonus, you get full _IE7_ support for all your friendly third world enterprise customers -- and no worries about responsive design because that's not supported at all!
I think things like this (Shoelace) are a great learning experience for the developer(s) in question or for fun throwaway stuff. You could make an argument for them for a team project where there's wide agreement, but for anything I will need to maintain or share with someone or hand off I pretty much only use Bootstrap as a starting point. Saves a lot of headaches down the line.
I think this is a great illustration of the fact that, although some people intend to be derisive in their speech, we shouldn't assume that any designation whatsoever is intended as derision. That is, everybody needs to chill and assume the other person is making a good-faith attempt to be reasonably polite until proven otherwise.
Don't know how big it is but it's very small and it's based on LESS so you can pick and match what you really need.
Used it with pretty good success since I like to roll my own (sorry!) and Bootstrap and others was a little to much Batteries Included.
Don't really agree with that as Bootstrap is also modular, especially if you use it from Sass or LESS source, which IMO is the 'right way' to use it.
(You can also make a customised build at http://getbootstrap.com/customize/ if you want to pick and choose modules but don't use a preprocessor like Sass/LESS).
TL;DR – most people just use the bundle because they don't want to setup a preprocessor.
> It's incredibly easy to set up
Yeah, once you've spent a few hours reading up on the latest docs. That's like me saying saying to you "Building a customized linux kernel for any hardware is incredibly easy with Yocto Project"
https://github.com/joe-watkins/gulp-sass-starter/blob/master...
Although you're correct, I meant in a professional environment. Id be quite surprised if I caught one of my devs not using a preprocessor.
For enthusiasts, most really do load the entire bundle via CDN. For Bootstrap 4-alpha6, that's 192KB of CSS and another 47KB of JavaScript.
They just copy and paste and override the raw CSS. Many don't even know what a preprocessor is, much less how to set one up. Now they don't have to.
But I never said this project wasn't bleeding edge. It will only become more relevant as browsers evolve :)
BTW - Shoelace is only 7.9KB min/gzipped.
img {
display: block;
max-height: 98vh;
max-width: 100%;
width:auto;
height:auto;
margin: 0.6rem auto;
padding: 0;
outline: 1px solid #333;
}That makes no sense. IPoAC doesn't really care if you add a few megs of scripts and images. Hell, it doesn't care if you add a few gigs. It will load at more or less the same speed as a single text document.
I wouldn't really believe that 60kb vs 90 makes a huge difference. Website get bloated at a different place.
[0] For example https://lancebachmeier.com/computing/j-b-test.html
> css variables
> 32KB (unzipped)
That said, I do love it though -- I have yet to dig into the CSS variables spec but I like that it offers near-bootstrap level functionality for a lot less size.
Compared to my usual go-to, https://purecss.io/ though, it's super duper heavy, a factor of 10. Then again, pure doesn't have as many nice-to-haves.
Also, I really like the height utilities... I find myself writing these two utility classes ALL the time:
.full-height { height: 100%; }
.full-min-height { min-height: 100%; }https://purecss.io/grids/#using-grids-with-custom-fonts
Am I really the only one who want to use another font than sans-serif with Pure? I had to hard-override the font on so many places just because sans-serif had such high specificity already.
Also I believe that Pure doesn't do the whole configure-with-sass thing -- though it can be customized, it's CSS only (https://github.com/yahoo/pure).
I wasn't aware of this shortcoming of Pure (maybe because I haven't used so many custom fonts), but I'm going to be keeping it in mind for the future.
My gut tells me you'll end up not using half the components that are included, and bend over backwards to make the config do what you want it to.
I much rather subscribe to the thinking in http://tachyons.io/ - just enough helper classes to create any layout you desire, and doesn't mess with defaults which means you can extend it to cover all edge cases.
It's not redundant, an element selector has a different specificity than a class selector. Much easier to maintain when Everything Is A Class (especially when paired with BEM, for very flat selectors). It's the reason Bootstrap stopped doing this.
Who cares if it's redundant? Classes are cheap and repeated strings cost you almost nothing after Gzip.
When you mix element selectors with class, ID, and multi-class (.foo.bar) selectors the specificity of each is different, and overwriting them means writing needlessly complicated selectors that are then in turn harder to maintain.
Bootstrap 4 goes as far as eliminating most sibling/child combinators (>, +, etc) because they add specificity. Anyone that's tried to write custom classes for list elements in Bootstrap 3 (.list-inline>li) has experienced this.
BS has actually has an .h1 class. Eventually a design calls for an <h2> that needs to have the visual appearance of an h1 but for SEO or HTML semantics reasons needs to be an h2.
Maintaining any site of a certain size it spirals into a nightmare quite quickly. Look at how Bootstrap 4 can add a dropdown to a <div> or a <nav>. If your rule was just `nav {}` you wouldn't have that portability, `.dropdown` is clearly superior. On sites of scale modular CSS wins every time.
>It's not Bootstrap. Different paradigm.
Could have fooled me as a lot of the class names and styling are identical. If the m-* and p-* spacing utilities are identical, is it really a different paradigm? BS has (Sass) variables as well.
Should I expect an <a> with `.text-success` to overwrite `.tab-group a`? Or do I need a new class for `.tab-group .text-success`?
Look at how BS4 broke up Navs from being `.navbar > li > a` to being .navbar, .navbar-item and .navbar-link and think about why they did.
In the meantime, a borderless table could be a modifier: table-borderless (i.e. like table-striped or table-bordered).
Just a different approach than what a lot of folks are used to :)
For that reason, I'll generally choose a <table>...</table> with a default style over having to do <table class="shoelaces-table">...</table> every time.
If you really do want to completely override the table style, it looks like it's just a matter of removing the respective line in https://github.com/claviska/shoelace-css/blob/master/dist/sh... and rebuilding.
Also, most modern browsers have a "developer" mode that shows exactly what CSS rules come from where. If the provided style really is getting in the way, it should be (relatively) easy to figure out what specifically is getting in the way (and then addressing it in your own CSS) instead of just blowing away the whole table style and starting from scratch. Looking at https://github.com/claviska/shoelace-css/blob/master/source/..., it doesn't look like it's doing all that much that'd be likely to conflict with anything in a way that would absolutely necessitate starting from scratch.
That's what we used to think when Semantic CSS was the big buzzword, lots of articles from '08-'11 preached it as the gospel. Turns out when a language is based on customizing presentation, presentation is semantic.
> I had a number of locations that I highlighted with a blue background and rounded corners. I called it `location` since it highlighted each of the locations
> When I opened the online store, I had a list of products and wanted to highlight each product using the same design pattern. Problem was, they weren’t locations. They were products. Being the lazy developer I was, though, I just reused the `location` class and applied it to my products. Clearly not ideal (but hey, it worked)!
> The design function was, of course, to highlight something. That was what I should’ve called it!
The new problem, though, is that in this case, if the developer wants to eventually use a different style for locations v. products, he'll now have to do the thing he was trying to avoid in the first place and have to create the new style.
If he stuck to letting HTML describe the content and CSS describe the presentation of that content, then when his tastes inevitably change, he'd just need to change one or the other class' styles in his CSS and call it a day.
This is even more relevant if you're using some kind of CSS preprocessor language (or whatever the term would be) like SASS/SCSS or LESS, since you can define that style as a mixin and apply it to each of the styles for specific content classes as you see fit.
Of course, what he did can still be compatible with HTML being content-declarative if you use a class like "important" or "special" or something; that way, you're still describing what the thing is without polluting HTML with presentation details. You can likely even mix that together ("important product" or "important location"), which would then pave the way for having unimportant products/locations.
> Turns out when a language is based on customizing presentation
Except HTML (especially HTML5) is not based on "customizing presentation". HTML is based on describing documents and the contents thereof. There were a few violations of that principle once upon a time (<b>, <i>, <u>, <blink>, <marquee>, etc.), but these are vestigial at worst (and outright eradicated at best), leaving a language that really is meant to declaratively describe content.
CSS is the language that is based on customizing presentation, and always has been (and hopefully always will be, though I can't wait for the day when CSS becomes Turing-complete).
>Except HTML (especially HTML5) is not based on "customizing presentation"
Right, I meant CSS, and the HTML classes you use to support it. h1.highlight is just as semantic as h1.
>CSS is the language that is based on customizing presentation
Right, so your CSS should be based on class names that point to their design function. Not "what something is".
>the "CSS" class names absolutely should reflect "what something is"
The example and article above goes to show exactly why that's wrong, if their function is design, they should reflect their design function. This is not theoretical, it is based on practice.
Again: you have things backwards. Classes are there to describe what an HTML element is supposed to represent. CSS uses these to decide how that thing is to be displayed. JavaScript uses these to decide how that thing is to behave.
> The example and article above goes to show exactly why that's wrong
Except they don't, as I already explained.
> if their function is design, they should reflect their design function.
Yes, and the design function of an HTML element class is to describe what that element is. The fact that CSS is able to make use of them is a side effect of that.
If you really want to abuse HTML semantics, then go ahead; nobody's stopping you. Just don't pretend that it's the correct approach.
> This is not theoretical, it is based on practice
And the standard practice is a tangled mess of <div class="grid grid-3-7 highlight">. Doesn't mean the standard practice is actually good, or that there's no room for improvement.
I already agreed with you: "they should reflect their design function"
You seem to be conflating semantic classes with presentational ones:
If all your articles have a blue border, maybe it makes sense to have .article have a border property. If your events, articles, and recipes all share the same Card format, it makes better since to keep those styles in .card.
>Except they don't, as I already explained.
You didn't explain; I said just remove the `highlight` class.
>Doesn't mean the standard practice is actually good, or that there's no room for improvement.
Not on its own, but the fact that this arose out of the maintenance nightmare that was "semantic CSS" from 5 years ago explains why it is now a best practice.
I'd encourage users to generate their own CSS bundle, so you only pull in whatever styles you need. Myth looks to be unmaintained. You can achieve the same thing with postcss and cssnext [0].
Also, related to CSSnext — isn't the @apply spec idea dead? Does that make CSSnext “yesterday's vision of tomorrow's CSS” but not what we think the future of CSS will look like now?
https://discourse.wicg.io/t/needed-new-champion-for-css-appl...
and the linked http://www.xanthir.com/b4o00 ("Why I Abandoned @apply")
This definitely applies more to some things than others, but I think it's worth questioning, too. Does the thing still work? Was it great 3 years ago? Is there a reason it's less great now (other than that it was created 3 years ago)?
FWIW I based my blog theme on Skeleton. I must admit that the 3 year age gave me pause (irrationally, probably) and that it's worked out nicely.
How are you supposed to look and see what you need or what's available?
I think it really depends on personal preference. I have stayed away from using the larger CSS frameworks. I won't mention them because I don't think it's right to "call out" CSS frameworks when its just my own personal usage of some frameworks over others.
I will mention ones that I have used:
Bootstrap ( http://getbootstrap.com/ )
Semantic UI ( https://semantic-ui.com/ )
Skeleton ( http://getskeleton.com/ )
GetFlakes ( http://getflakes.com )
Milligram ( http://milligram.github.io/ )
HackCSS ( http://hackcss.com/ )
Furtive ( http://furtive.co/ )
BassCSS ( http://basscss.com/ )
w3.css ( https://www.w3schools.com/w3css/ )
Spectre ( https://picturepan2.github.io/spectre/ )
CaiuSS ( http://ionicabizau.github.io/CaiuSS/ )
I really like the stuff and fluff Spectre offers: cards, navigation bar, etc.
Pure's grid is what I use exclusively. Simple, easy, and targets the screen sizes I want,
I know this bills itself as a "reset" but when you look at the buttons, text utilities, spacing utilities etc it's far beyond that. In many cases it's just re-using Bootstrap's naming conventions and code. As far as I can tell there's nothing like Bootstrap's theme customization tool for it, so I'd have to do it all by hand.
In the near future, grid systems will be more and more obsolete (https://rachelandrew.co.uk/archives/2017/07/01/you-do-not-ne...), and Shoelace is prepared for that. Why add the weight if you don't need it?
>it just advocates capital 'G' Grid instead of other solutions
I also said:
>There's an entire section where they encourage a framework for working with Grid
as a rebuttal to your claim otherwise.
This PR will reduce the size down to 18KB.
Edge 16 hasn't been released yet.
I look forward to CSS Grid being widely available and in the meantime degrading gracefully in non-supporting browsers is often viable. My concern is for the users of sites developed by the many people who do not give any thought to how their site performs using anything other than what they personally use.
If your target browser can't support CSS Grid it's probably too old to support CSS Variables (CSSS custom properties) anyway.
Not ideal, sure (especially if you're JavaScript-averse, like I am), but it's a start.
It has styling for a navbar, panels, and empty states, which is quite neat.
Spectre has a flexbox-based grid, which I ditched in favour of Pure's grid simply because it targets the screen sizes I want: https://purecss.io/grids/
Shoelace,css is interesting. Perhaps I'll choose it for my next project.
It'll automatically handle github or npm packages or any custom setup if you need it.
For example: https://cdn.jsdelivr.net/gh/claviska/shoelace-css@1.0.0-beta...
jsDelivr has a lot more sponsors and a bigger network.
[0]: https://github.com/facebook/react/issues/10294#issuecomment-...
....what? Is this even valid CSS?
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_v...
https://developer.mozilla.org/en-US/docs/Web/CSS/:root
Unfortunately since IE doesn't use it, most of us won't be able to either, as much as we want to :(
If you like Shoelace.css, would you vote it up on Product Hunt? https://www.producthunt.com/posts/shoelace-css
Thanks :)