Live data from Hacker News

MVP.css – Minimalist stylesheet for HTML elements

andybrewer.github.io

71–80 of 122 posts

Re: MVP.css – Minimalist stylesheet for HTML elements

#71
post #36

Earlier quoted context omitted.

> 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…

I 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…

The 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."...

Re: MVP.css – Minimalist stylesheet for HTML elements

#72

Earlier quoted context omitted.

I have to say I'm on the fence on this. On the one hand, in the first instance it seems a lot easier to remember the syntax. But thinking about it for longer, I realise that actually if I'm having to learn to put an inside a for a card, but an inside an becomes a callout, then perhaps it's not quite as intuitive as it seems, and if I have the mental overhead of remembering all that, perhaps I might be saving myself m…

I’d honestly prefer to . is very non-obvious, and is semantically wrong in a way that will cause (very) mild accessibility trouble. is nominally invalid HTML (a reserved element name, basically), but will cause no accessibility trouble, and it’s rather unlikely that it’ll break in any way in the future. You could resolve the invalidity by spelling it (at the cost of being an inline element in the absence of styleshee…

I thought about this when I was writing my comment, my mind wandered down the track of:

'hey, maybe you could create a web component ? That would be cool. It's a shame you can't create web components without JS, wouldn't it be great just to have an HTML only syntax for creating a web component, like or something?'

Then I realised that I still have to learn something else to write a 'card', so I might as well just keep it simple and use div.card. If I want anything more complex, I can use one of the many component frameworks that exist.

Re: MVP.css – Minimalist stylesheet for HTML elements

#73
post #53

Earlier quoted context omitted.

But putting the ` ` and ` ` inside the ` ` element is not semantically correct. If it would be, you wouldn't need ` `. That's exactly why there's a very basic limit to classless CSS frameworks.

That'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…

I 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 `` and `` 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 `` should rather be in the `` element.)

So this is what my most basic structure inside the `` would look like:

  
  
  
If you're doing this with the global page header/footer, there would be no reason to use `` at all:

  
    
    
  

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?

Re: MVP.css – Minimalist stylesheet for HTML elements

#74

Earlier quoted context omitted.

I’d honestly prefer to . is very non-obvious, and is semantically wrong in a way that will cause (very) mild accessibility trouble. is nominally invalid HTML (a reserved element name, basically), but will cause no accessibility trouble, and it’s rather unlikely that it’ll break in any way in the future. You could resolve the invalidity by spelling it (at the cost of being an inline element in the absence of styleshee…

I thought about this when I was writing my comment, my mind wandered down the track of: 'hey, maybe you could create a web component ? That would be cool. It's a shame you can't create web components without JS, wouldn't it be great just to have an HTML only syntax for creating a web component, like or something?' Then I realised that I still have to learn something else to write a 'card', so I might as well just kee…

No need for JavaScript unless you want your element to have additional behaviour attached to it. would be perfectly valid with no JavaScript required. But yeah, there’s not generally particular value in doing it that way rather than a div or span with a class attribute.

Re: MVP.css – Minimalist stylesheet for HTML elements

#75
post #37

Previous discussions: • https://news.ycombinator.com/item?id=25167928 (21 November 2020, 82 comments) • 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…

In their defence they openly state its not for the final product but rather to get _something_ shipped.

There's nothing more permanent than a temporary solution.

Re: MVP.css – Minimalist stylesheet for HTML elements

#76

Earlier quoted context omitted.

I 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…

The 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."...

I'd say it's way more nuanced than that. I appreciate the comment since I gained knowledge on both HTML and about this project's particular usage of it. If a project is based on an unconventional idea and this is undisclosed it's nice for everyone to point this out, it doesn't have to be interpreted as an attack.

Re: MVP.css – Minimalist stylesheet for HTML elements

#77
> [pro tip] Add this code to a new HTML file:

> 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` I’d be sure it wouldn’t happen.

Re: MVP.css – Minimalist stylesheet for HTML elements

#78

Earlier quoted context omitted.

I thought about this when I was writing my comment, my mind wandered down the track of: 'hey, maybe you could create a web component ? That would be cool. It's a shame you can't create web components without JS, wouldn't it be great just to have an HTML only syntax for creating a web component, like or something?' Then I realised that I still have to learn something else to write a 'card', so I might as well just kee…

No need for JavaScript unless you want your element to have additional behaviour attached to it. would be perfectly valid with no JavaScript required. But yeah, there’s not generally particular value in doing it that way rather than a div or span with a class attribute.

Interesting, thanks, did not know that would be valid!

Re: MVP.css – Minimalist stylesheet for HTML elements

#80

https://github.com/andybrewer/mvp/ - Out of the box CSS styling for HTML elements. No class names, no framework to learn.

> 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, `` is interpreted as a card and `` is a "notification bubble". The worst part is you have no way of disabling this behavior: `422` will always show a "bubble" with `2` next to `42`. What’s "semantic" in that?

Post reply on HN