Show HN: Mimic – class-fied inline CSS
31–40 of 74 posts
Re: Show HN: Mimic – class-fied inline CSS
#32I don't think this is a joke. I think this is just something that probably isn't useful as a library/framework/whatever + maybe an incomplete understanding of how CSS best fits into the puzzle.
Re: Show HN: Mimic – class-fied inline CSS
#33Earlier quoted context omitted.
Although bear in mind that bootstrap still does class="alert alert-danger" so they disagree slightly on that point.
If you're using sass you just extend alert inside alert-danger. No need for two classes.
Re: Show HN: Mimic – class-fied inline CSS
#34I feel like this is akin to "killing the patient to cure the disease." In the uses I can see for this, the way this framework solves the problem, to me, seems to be worse than any problem itself. Namely, I would like to know how this is any better than !important on your CSS properties. Firstly, you're messing up your separation of concerns, you're also messing up an attribute with values that other developers will p…
My motivation to write this is because I always have to go back and make quick margin/padding/etc changes and I hated trying to come up with more class names.
As mentioned, this isn't a framework. It was a way for me to add styles when writing styles to custom directives.
Re: Show HN: Mimic – class-fied inline CSS
#35Could you please elaborate a bit more on how a class "padding:10" is better than just adding an inline style "padding:10px"?
I don't think it's a "better" way, I wanted to explore another way of adding quick styles without having to come up with a class name.
Re: Show HN: Mimic – class-fied inline CSS
#36Earlier quoted context omitted.
I'd presume because you can do browser-specific hacks/normalization with classes but not inline styles. I don't really see the point of all of this, either, though. Maybe it's satire?
It must be effective satire, my blood boils with the possibility it's an honest attempt.
Re: Show HN: Mimic – class-fied inline CSS
#37Hey, this is a very radical approach. I have great respect for people who ship something (anything!), because they have the vision to see things differently and actually execute this vision. This may take some getting used to, and a lot of debate if using this is really worth it, but it's something. Nice job! :)
Re: Show HN: Mimic – class-fied inline CSS
#38When doing things like this, you should take ie into consideration http://spaceninja.com/2015/03/31/ie-css-limits/ Using parker ( https://github.com/katiefenn/parker ) tool to analyze the css: curl http://peterchon.github.io/mimic/css/mimic.css -s | parker -s PARKER-JS Total Stylesheets: 1 Total Stylesheet Size: 126045 Total Rules: 2551 Total Selectors: 2611 Total Identifiers: 5292 Total Declarations: 3849 Selectors…
Re: Show HN: Mimic – class-fied inline CSS
#39Earlier quoted context omitted.
If you're using sass you just extend alert inside alert-danger. No need for two classes.
But then you'll create bloat. Multiple classes assigned to an element is far more efficient then repeating properties with the same values over multiple classes in the stylesheet.
Re: Show HN: Mimic – class-fied inline CSS
#40How do you handle advanced selectors? Or hover states? Or priority? Or inheritance? There is a lot of reasons why separating content and styling is benefitial to both the designer and the developer. And why semantic classes, especially with tools like Sass where abstraction and reusability are key, allow to describe the content, not define its looks. That's why we went from color="red" to style="color:red;" to class=…
I'm not trying to be bootstrap. I wanted a way for users to add css without using an inline-css. As for psudo selectors, it's still easy: .do-this-on-hover:hover { ... }