orockwell

joined 2 years ago
[–] orockwell@lemmy.world 1 points 1 day ago (1 children)

Yep! This pattern will work on any website. You only need to be able to write CSS, and apply a class to the body tag.

AFAIK Jekyll uses Liquid for template flow control - you could set the class; or even load specific CSS that way too

[–] orockwell@lemmy.world 2 points 2 days ago* (last edited 2 days ago) (3 children)

Tokenise your styles with variable layers. Eg: put a class on your body tag for each theme, eg: dark-mode, high-contrast

Then define your components by abstract style variables, eg: button-color, heading-weight,

Then define the style variables for each theme:

body { --button-color: green; }

body.dark-mode { --button-color: blue; }

button { backgroud: var(--button-color); }

Then all you need to do is a simple JS function to set the appropriate theme class on your document body!

This way your components are compliant to your style guide, without needing to know the implementation details of your themeing Very SRP, much Demeter, such OCP

Apologies for psudocode, LMK if you have any furthers :)

[–] orockwell@lemmy.world 23 points 1 week ago (5 children)
[–] orockwell@lemmy.world 9 points 3 months ago

Oh thank god, thats his daughter

[–] orockwell@lemmy.world 5 points 3 months ago
[–] orockwell@lemmy.world 3 points 3 months ago

Motorcycle, but yes absolutely.

[–] orockwell@lemmy.world 5 points 4 months ago

Ask Will Toledo.

[–] orockwell@lemmy.world 11 points 4 months ago* (last edited 4 months ago)

Yes.*

You can patent a design pattern, within a specific context (provided the patent is approved)

NAMCO infamously patented 'Loaing Screen Games', with its documented example being Galaga.

Thankfully that patent expired in 2015. Hope this answers your question!

[–] orockwell@lemmy.world 2 points 4 months ago

Love this Insert Credit type question

[–] orockwell@lemmy.world 10 points 5 months ago (2 children)
[–] orockwell@lemmy.world 4 points 11 months ago

Note: the final paragraph contains spoilers for Starfield's ending

view more: next ›