10 ms·
MVP.css – Minimalist stylesheet for HTML elements
- blameitonme 4y ago"By far the easiest stylesheet I've ever used. It integrates easily into one all of my startup projects." - Andy Brewer, Author of MVP.css, when talking about MVP.css Am I missing something?
- stingraycharles 4y agoHe’s demonstrating the various components, rather than having actual testimonials, and as such this is just a joke.
- hrrsn 4y agoI chuckled when I read this. Amazing
- deleted 4y ago[deleted]
- duxup 4y agoIt’s a fun joke.
- webspaceadam 4y agolooks cool. i will try this for my pocs
- encryptluks2 4y agoIt is hard to take any stylesheet seriously when their website doesn't even properly use meta color scheme tags. Also, their examples are like the opposite of normal element approaches to what you're trying to accomplish. <blockquote><footer> for quote attribution? How does that even make sense?
- djbusby 4y agoI put cite in blockquote - I thought that was the "rule". Meta color was new for me -- https://css-tricks.com/meta-theme-color-and-trickery/ https://css-tricks.com/meta-theme-color-and-trickery/
- eyelidlessness 4y ago> It is hard to take any stylesheet seriously when their website doesn't even properly use meta color scheme tags. I did my best looking at the source in my mobile browser, thinking they’d somehow misused the meta theme-color feature, but they haven’t used that at all. It seems your gripe is that they haven’t provided dark mode styles. Which is a reasonable gripe (and I provide them for my site even though I prefer light mode), but clarity is really helpful especially when criticizing someone’s work in a detailed way. As far as the blockquote/footer tag combination, it’s definitely not ideal but it is semantically valid. Anyway, HN has enough people quick to criticize so I’ll leave it at this: you have valid complaints about the submission, but I imagine the authors would be receptive to them as suggestions which take no more effort.
- encryptluks2 4y agoYes, my gripe is that they are not using a prefers-color-scheme so that my browser properly uses dark mode and that some of the elements they use are not best practice. It is fair to say that I am not the most constructive person in doing so, but I also feel that by offering it as a framework they should already be aware of this.
- eyelidlessness 4y agoThis is already much better feedback IMO!
- chrismorgan 4y agoI think blockquote attribution recommendations are perhaps the least stable part of the HTML spec I can think of. There have been at least three, I think at least four, completely different and mostly mutually-incompatible recommendations in the past decade. `blockquote > footer` was the recommendation a few years ago. Now they say <https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element https://html.spec.whatwg.org/multipage/grouping-content.html...>: > Attribution for the quotation, if any, must be placed outside the blockquote element. … and suggest things like `blockquote + p` and `figure > blockquote + figcaption` instead. I will also note that that use of figure would have been semantically inappropriate a decade ago, when figure was supposed to be something that could reasonably be taken out of the document flow, but now that’s been downgraded to just being a self-contained unit, though it may be able to be taken by itself and it’s generally suggested that you refer to figures by their captions.
- ad404b8a372f2b9 4y agoThis is amazing! Exactly what I was looking for when I was building my MVP, just a responsive, standard looking stylesheet I could plug-in. All the supposedly JS-free CSS frameworks use JS for their most basic components. I bought a template on one of those template sites but it needed like 20 JS scripts just to display the landing page. I thought of trying the Zengarden stylesheets but they didn't cover the components I needed for a saas website, and they were also way too characterful. I'm past the MVP stage but I would have paid for this if I had seen it 6 months ago, at least the price of a template: 20-50$.
- doodlesdev 4y agoQuite a lot of stylesheets in this simillar vein [0]. Basically doing CSS by using HTML5 semantic elements instead of classes. My personal favorite is Water.css [1], because it looks good and makes very good use of HTML5 semantics. Tacit [2] is also amazing. [0]: https://css-tricks.com/no-class-css-frameworks/ https://css-tricks.com/no-class-css-frameworks/ [1]: https://watercss.kognise.dev/ https://watercss.kognise.dev/ [2]: https://yegor256.github.io/tacit/ https://yegor256.github.io/tacit/
- louismerlin 4y agoOne more that could be added to this list: https://concrete.style https://concrete.style (I'm the author)
- Tade0 4y ago> Modify the base font-size to 62.5% so that 1.6rem = 16px. Would you consider removing this?
- louismerlin 4y agoOf course! I took this idea from the milligram project [1], but if you feel like it is a downside I am open to hearing your arguments. Feel free to open an issue [2] so we can discuss it. [1]: https://github.com/milligram/milligram/blob/master/src/_Base.sass https://github.com/milligram/milligram/blob/master/src/_Base... [2]: https://github.com/louismerlin/concrete.css/issues/new https://github.com/louismerlin/concrete.css/issues/new
- reacharavindh 4y agoI remember loving a similar stylesheet for my personal blog, but ended choosing Tachyons because I wanted to have images alongside text(images aligned left, center right alongside text) that I couldn’t figure out how to do with such minimal css.. if anybody knows how, I’d be grateful!
- franciscop 4y ago
- stanislavb 4y agohttps://github.com/andybrewer/mvp/ https://github.com/andybrewer/mvp/ - Out of the box CSS styling for HTML elements. No class names, no framework to learn.
- baxtr 4y agoLove the “social” proof by the author himself: "By far the easiest stylesheet I've ever used. It integrates easily into all of my startup projects." MVP.css - Andy Brewer, Author of MVP.css
- hk__2 4y ago> Out of the box CSS styling for HTML elements. No class names, no framework to learn. Well it’s still a framework. A light one, but still a framework. You still have to learn how it works. For example, `<section><aside>` is interpreted as a card and `<sup>` is a "notification bubble". The worst part is you have no way of disabling this behavior: `42<sup>2</sup>` will always show a "bubble" with `2` next to `42`. What’s "semantic" in that?
- swyx 4y agoi collect these CSS frameworks for fun! here's my list: ### Drop-in CSS Frameworks preview some of these with https://sites.yax.com/ https://sites.yax.com/ - [Spectre.css](https://picturepan2.github.io/spectre/getting-started/installation.html https://picturepan2.github.io/spectre/getting-started/instal...) - https://latex.vercel.app/ https://latex.vercel.app/ - https://purecss.io/ https://purecss.io/ - https://picocss.com/ https://picocss.com/ - https://gdcss.netlify.app/ https://gdcss.netlify.app/ (inspired by UK design system) - https://simplecss.org/demo https://simplecss.org/demo - https://ajusa.github.io/lit/ https://ajusa.github.io/lit/ - https://screencss.com/ https://screencss.com/ - https://andybrewer.github.io/mvp/ https://andybrewer.github.io/mvp/ - https://github.com/xz/new.css https://github.com/xz/new.css - https://github.com/oxalorg/sakura https://github.com/oxalorg/sakura - https://native-elements.dev/ https://native-elements.dev/ - https://watercss.kognise.dev/ https://watercss.kognise.dev/ - https://luxacss.com/ https://luxacss.com/ - https://jenil.github.io/chota/ https://jenil.github.io/chota/ - https://chr15m.github.io/DoodleCSS/ https://chr15m.github.io/DoodleCSS/ hand drawn look - https://github.com/susam/spcss https://github.com/susam/spcss - https://elementcss.neocities.org/ https://elementcss.neocities.org/ - https://codepen.io/web-dot-dev/pen/abpoXGZ https://codepen.io/web-dot-dev/pen/abpoXGZ the base classes for web.dev/learn/csss - https://open-props.style/ https://open-props.style/ css variables framework - "tailwind without tailwind" - https://github.com/alvaromontoro/almond.css https://github.com/alvaromontoro/almond.css classless css framework. [thin fonts] (https://news.ycombinator.com/item?id=30497165 https://news.ycombinator.com/item?id=30497165). - Collections of even more: - https://github.com/dohliam/dropin-minimal-css - https://github.com/dbohdan/classless-css - https://github.com/ubershmekel/cssbed (https://www.cssbed.com/) - https://thesephist.github.io/paper.css/ and https://thesephist.github.io/blocks.css/ full list here: https://github.com/sw-yx/spark-joy/blob/master/README.md#drop-in-css-frameworks https://github.com/sw-yx/spark-joy/blob/master/README.md#dro...
- doodlesdev 4y ago> https://chr15m.github.io/DoodleCSS/ https://chr15m.github.io/DoodleCSS/ hand drawn look Just found the stylesheet for my website's redesign, thank you :) I'm surprised that Tacit is missing from the list though. When it comes to modern design using classless CSS my order of preference is normally water.css, tacit, and then MVP.css. It just looks great and uses the HTML5 semantic elements to their full potential.
- BoorishBears 4y agoJust yesterday I was using this a tool to compare similar minimalist stylesheets: https://github.com/dohliam/dropin-minimal-css https://github.com/dohliam/dropin-minimal-css
- russellbeattie 4y agoNot putting your page header and footer inside the <main> element is a giant pain in the ass. Both ways are semantically correct and accessible, but putting them inside the main gives you more flexibility to control your page margins/padding for various display sizes and lets you set up a grid for the whole page.
- zichy 4y agoBut putting the `<header>` and `<footer>` inside the `<main>` element is not semantically correct. If it would be, you wouldn't need `<main>`. That's exactly why there's a very basic limit to classless CSS frameworks.
- tannhaeuser 4y agoThat's incorrect. You can have a header and footer for each sectioning element/sectioning root (eg article) in your doc [1] (but you can't have a main element in header or footer content [2]). In general, I don't think "HTML semantics" are really as stringent as assumed by some commenters. After all, HTML was just intended as a vocabulary for casual academic publishing, but is of course abused for text that could be much, much more simply and adequately described using other, more targeted or customized SGML vocabularies rather than HTML. [1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fo... [2]: http://sgmljs.net/docs/w3c-html52-dtd.html http://sgmljs.net/docs/w3c-html52-dtd.html
- zichy 4y agoI was referring to the global page header/footer you were talking about, should've made that more clear. Obviously you are allowed to use multiple `<header>` and `<footer>` elements on the same page. While it is true that HTML semantics aren't as stringent as often assumed, there certainly are more or less universally accepted best practices. They depend on the complexity of the site itself. (It may also be unclear what a "page header" actually is. It could contain your logo and navigation, but the `<h1>` should rather be in the `<main>` element.) So this is what my most basic structure inside the `<body>` would look like: <header></header> <main></main> <footer></footer> If you're doing this with the global page header/footer, there would be no reason to use `<main>` at all: <main> <header></header> <footer></footer> </main> Also, I can't really reproduce your initial issue regarding the flexibility of page spacing. You are pretty limited when using classless CSS, but where's the problem using the body selector for that?
- catchmeifyoucan 4y agoI love mvp.css This made shipping my side project so much easier. I like that it’s opinionated and gets you going fast. You’re not really spending time picking colors, and you can focus on the content. This is the landing page I built: https://figmage.com https://figmage.com
- psnehanshu 4y agoLooks interesting!
- illegalmemory 4y agoThis is interesting, do you have paying customers ?
- catchmeifyoucan 4y agoYes I do!
- Madeindjs 4y agoI see an horizontal scroll because of a code block containing a non wrapped URL
- notatoy 4y agoThis reminds me of a css switcher project I found on GitHub [1] while I was messing around with classless style sheets. Makes it just so easy to switch and select. Embed in your html page, select an item from the drop down and see what it does to the page, when you’re happy, remove ! Simple. Genius. Wonder why I never thought of it. Also has a demo page [2] to try it out [1]: https://github.com/dohliam/dropin-minimal-css https://github.com/dohliam/dropin-minimal-css [2]: https://dohliam.github.io/dropin-minimal-css/ https://dohliam.github.io/dropin-minimal-css/
- greenSunglass 4y agoThank you. love this
- laundermaf 4y agoHaving such a stylesheet not automatically work in dark mode defeats the purpose. It says "no classes" but then it demands that you add an invalid attribute on your HTML to trigger it. OK, that's a no for me. Source: https://github.com/andybrewer/mvp/issues/76#issuecomment-1215927239 https://github.com/andybrewer/mvp/issues/76#issuecomment-121...
- awb 4y agoAuthor of MVP.css here. Dark mode is a really cool CSS feature, but it requires a level of maintenance that goes above and beyond an MVP IMO, so I decided to remove support for it. I had it included originally, but it meant 2x the QA and 2x the icons in some cases. If it’s important to you there are other libraries that might be a better fit.
- brtkdotse 4y agoI admire your ability to maintain a friendly attitude despite the rather abrasive tone in the original comment.
- sandreas 4y agoShort question: Does anyone know about any performance issues using semantic vs class-based css? I ask, because in the early days of css we also tried to use semantic style and had strange rendering issues on huge data tables and everytime, when the page had a lot of content. After trying a few things we came to the conclusion, that (especially but not only) IE had huge performance issues with semantic style. After switching to classes, everything worked fine. It technically made no sense, but since we did not change anything else, we came to the conclusion, that class based is faster than semantic... Did anyone ever measure this for modern browsers?
- rimliu 4y agoClasses can be semantic too. Are you talking about element selectors?
- sandreas 4y agoYes, I meant element selectors... as you see it happened some time ago when I was more into HTML and CSS :-) Now I'm more into backend.
- laundermaf 4y agoYou’re referring to “tag selectors” vs “class selectors” Engines are now good enough you don’t really have to worry about selector performance unless you’re using ridiculously complex selectors, and even then the least efficient part is actually the layout calculation and painting. This site is super simple and is super laggy on Safari Mac because they use awkward effects and animated gradient backgrounds, for example: https://colorjs.io/ https://colorjs.io/
- sandreas 4y agoThank you... sounds plausible. Is there a reference or performance test for this you can refer to?
- ayushnix 4y agoI came across this blog post which talks against styling HTML tags and using classes for performance reasons and scalability. I'm not sure if the impact is noticeable on web browsers, I'd love to see an objective comparison. https://frontstuff.io/you-need-to-stop-targeting-tags-in-css#performance-issues https://frontstuff.io/you-need-to-stop-targeting-tags-in-css...
- unsafecast 4y agoI like the idea. Good job. But that table. I'm not even sure what to say. How come custom CSS doesn't support semantic HTML? Or makes you use class names? Or is hard to customize? Sure, the last one might be controversial but I'm pretty sure most would agree that the other ones just make no sense.
- chrismorgan 4y agoPrevious discussions: • https://news.ycombinator.com/item?id=25167928 https://news.ycombinator.com/item?id=25167928 (21 November 2020, 82 comments) • https://news.ycombinator.com/item?id=22681270 https://news.ycombinator.com/item?id=22681270 (25 March 2020, 91 comments) —⁂— > No class names, no frameworks, just semantic HTML and you're done. The trouble with this claim is that MVP.css abuses semantic HTML badly, using completely inappropriate elements all over the place (e.g. aside for cards, and b/strong/i/em inside links to make them look like buttons of various kinds), and the author has declined to change these things despite acknowledging that they’re wrong.
- patates 4y ago> the author has declined to change these things despite acknowledging that they’re wrong I mean, if they already have projects running with this, it makes sense. If I learned one thing in my professional life is that while being a perfectionist already is not the best way to approach the vast majority of the problems, it's especially true when it comes to HTML. Also, I hate to be that guy, but seriously, this thing seems like one of the easiest open source projects to get into, so why not fork?
- chrismorgan 4y agoI enjoy reviewing things like this and pointing out the problems in the hopes of improving them, or at least teaching others who will hear—when I post detailed reviews, I normally get positive reviews on the reviews (whether from the original author or from others), and feel I have helped people. But I don’t actually use things like this; I’m far too strongly opinionated and will do my own thing every time. (And for anyone else thinking of forking something like this: there are already a very large number of things like this, consider whether it’s worth the bother, maybe just find another one that has a different set of problems. :-) )
- Double_a_92 4y agoThe problem is that that (bad) thing, is the core idea of their project. So from their view you're basically saying "Yo, your project sucks. Make a better one."...
- seydor 4y agoMost of all it's exciting to see that HTML supports more and more input functionality for which people used javascript and native apps. What took us so long
- bepero 4y agoHere are few more: https://www.designinspiration.info/classless-css-frameworks/ https://www.designinspiration.info/classless-css-frameworks/
- foxbee 4y agoPretty cool name. I'm surprised there's not a simple generator for generating these tiny stylesheets - or maybe there is?
- quickthrower2 4y agoI have used it, and like it. But! It is no easier than a class based CSS framework. Instead of guess the classname you play guess the element name. And by attaching style to elements 1-1 you can end up with something less semantic than using a regular CSS framework or a utility based CSS framework.
- hk__2 4y ago> [pro tip] Add this code to a new HTML file: > <link rel="stylesheet" href="https://unpkg.com/mvp.css https://unpkg.com/mvp.css"> That’s not a "pro tip"; that’s a very bad advice: you should always use versioned URLs. What if I find this project cool; add this URL in my HTML; and then the author changes things in ways I don’t like? It’ll break my website. If I used something like `https://unpkg.com/mvp/v2.3.45/mvp.css https://unpkg.com/mvp/v2.3.45/mvp.css` I’d be sure it wouldn’t happen.
- duxup 4y agoIs this likely to change a great deal? An mvp css? You can always just copy it yourself.
- andix 4y agoEmbedding external styles may also violate users privacy and may not be okay with the European GDPR. To be on the safe side, you should only load external resources after the user agreed in a consent dialog. Or just host them on your web server!
- sockopen 4y agoTo quote further down the page “An MVP is a temporary site, it doesn't have to be and shouldn't be perfect.”
- hk__2 4y agoTo quote someone else in this thread [1]: "there's nothing more permanent than a temporary solution." [1]: https://news.ycombinator.com/item?id=32808640 https://news.ycombinator.com/item?id=32808640
- lelandfe 4y ago> just semantic HTML and you're done Meanwhile, `a em` is styled as a button.
- Glench 4y agoThis stylesheet has been invaluable for moving fast on my side project: https://extensionpay.com/ https://extensionpay.com/ One pro-tip though — I found that using unpkg slowed down the page a ton sometimes. I serve the file myself and it's been much faster. YMMV but thought y'all should know just in case.
- psychphysic 4y agoI LOVE that the superlative quote used in the marketing is from the project author!
- Existenceblinks 4y agoI think this is the same category as https://github.com/sindresorhus/modern-normalize https://github.com/sindresorhus/modern-normalize `modern-normalized.css` can be for MVP too. Honestly few < 100 lines on top of normalized one isn't that much work.
- elicash 4y agoI used this for a project. I was working with somebody who didn't know HTML and had them overwriting an HTML file and uploading it to an S3 bucket over the course of 3 days, maybe twice a day, and I wanted code as simple for them as possible to prevent errors.
- zagrebian 4y agoOn the demo page [1], the <main> element starts with an <hr>. That doesn’t seem right. The <hr> element is meant for section breaks (where there is content both before and after the <hr> element), not for decorative horizontal lines. [1]: https://andybrewer.github.io/mvp/mvp.html https://andybrewer.github.io/mvp/mvp.html
- lelandfe 4y agoTrue, but soooo minor. The element has no impact on the document outline, and many sites use it decoratively today. If we're really being pedantic, all uses of <hr> elements on that page are contrary to the spec's desires. > The hr element represents a paragraph-level thematic break, e.g. a scene change in a story > There is no need for an hr element between the sections themselves, since the `section` elements and the `h1` elements imply thematic changes themselves https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element https://html.spec.whatwg.org/multipage/grouping-content.html... If it isn't clear, I find it a bit silly :)
- samgranieri 4y agoI enjoy finding stuff like this, and kudos to the author for making it. I remember hand-writing HTML going back to using BBedit in 1995 and just enjoy the simplicity of semantic html elements. Sometimes, less is more. . I spend more of my time doing back-end work and some ops type work. Later on (early 2000s) obviously I'd have to use tables for laying stuff out, then relying on the good work of Jeff Zeldman and the like to beef up CSS knowledge, then finally using stuff like Bootstrap and Tailwind.