mayu-live/framework

Generate longer class names in CSS

aalin opened this issue · 2 comments

aalin commented

According to this comment on StackOverflow, class names can contain almost anything...

This means that, right now, class names look like this:

.title-THPvbm_kJn5Ytiqx

Those names aren't very readable...

It would be better to generate:

<h1 class="app/components/MyComponent.css#title-THPvbm_kJn5Ytiqx">title</h1>
.app\/components\/MyComponent\.css\#title-THPvbm_kJn5Ytiqx {
  background: #f0f;
}
aalin commented

Not 100% sure about the format..

class="app/components/MyComponent.title?THPvbm_kJn5Ytiqx" maybe.. looks more like a URL

aalin commented

Should be pretty easy to locate where the CSS comes from.. also there are source maps..

Screen Shot 2022-10-24 at 21 47 57

Screen Shot 2022-10-24 at 21 50 58

Using this parser will improve flexibility...
There are probably a few bugs, but it gives a lot of control..