4 ms·
I see that in the README, you give an example that uses `hstack` and `vstack` tags. Can you just declare you own tags that are essentially wrappers for CSS? If
by jjice 6y ago
I see that in the README, you give an example that uses `hstack` and `vstack` tags. Can you just declare you own tags that are essentially wrappers for CSS? If not, I'd love an explanation what what they do.
- swlkr 6y agoIt's not super obvious from the README, but I did throw a few examples together here: https://ridgecss.com/examples.html https://ridgecss.com/examples.html There's also the original inspiration for them here: https://almonk.github.io/pylon/ https://almonk.github.io/pylon/ They are essentially swiftui-ish helpers to lay things out with even spacing vertically (vstack) or horizontally (hstack)
- hanniabu 6y agoIt appears that menus aren't visible on mobile. Any reason for that?
- swlkr 6y agoHmm it's probably my media queries, the menu should show up at the bottom of the screen at 507px https://github.com/swlkr/ridgecss/blob/master/ridge.css#L970 https://github.com/swlkr/ridgecss/blob/master/ridge.css#L970 but since they aren't for you, it's the first bug!
- jjice 6y agoI didn't realize you could do something like: big {font-size: 73pt} And now you can use a <big> tag. Very cool.
- dmix 6y agoYou can define your own arbitrary HTML < /> tags and style them or use JS with them in modern browsers (which is what hstack and vstack are, which seems to be inspired by the pylon framework and SwiftUI). If you need to support really old browsers than using an HTML5 shiv will be sufficient for any <tag /> to work: https://johnresig.com/blog/html5-shiv/ https://johnresig.com/blog/html5-shiv/ There's a longer discussion here about pros/cons: https://stackoverflow.com/questions/16867332/html5-why-not-use-my-own-arbitrary-tag-names https://stackoverflow.com/questions/16867332/html5-why-not-u... I have a feeling this is one of those things that will become more common with this broader support for HTML5 and web components but at the moment it's not very common and there are some debates on whether you should break web standards/specs.