This commit is contained in:
Miloslav Ciz 2024-06-07 16:46:05 +02:00
parent 50af01815e
commit 8b1d7a4381
30 changed files with 1893 additions and 1799 deletions

2
css.md
View file

@ -10,6 +10,8 @@ Back in the boomer web days -- basically before the glorious year 2000 -- there
**Correct, [LRS](lrs.md) approved attitude towards this piece of [bloat](bloat.md)**: as a minimalist should you avoid CSS like the devil and never use it? Usual LRS recommendations apply but, just in case, let's reiterate. Use your brain, maximize [good](less_retarded_society.md), minimize damage, just make it so that no one can ever say "oh no, I wish this site didn't have CSS". You CAN use CSS on your site, but it mustn't become any burden, only something optional that will make life better for those using a browser supporting CSS, i.e. **your site MUSTN'T RELY on CSS**, CSS mustn't be its [dependency](dependency.md), the site has to work perfectly fine without it (remember that many browsers, especially the minimalist ones not under any corporation's control, don't even support CSS), the site must not be crippled without a style, i.e. firstly design your site without CSS and only add CSS as an optional improvement. Do not make your HTML bow to CSS, i.e. don't let CSS make you add tons of divs and classes, make HTML first and then make CSS bow to the HTML. Light CSS is better than heavy one. If you have a single page, embed CSS right into it ([KISS](kiss.md), site is self contained and browser doesn't have to download extra files for your site) and make it short to save bandwidth on downloading your site. Don't use heavy CSS features like animation, blurs, [color](color.md) transitions or wild repositioning, save the [CPU](cpu.md), save the planet (:D). Etcetc.
**PRO TIP: you can achieve some basic formatting completely without CSS** (i.e. even without the `style` attribute) -- for some things you can use the old HTML visual attributes. Whether it's better to do it this way or rather use CSS depends on situation, but it's good to have a choice, this may allow you to just completely avoid CSS (e.g. to get to the "nocss" website club) and maybe have better chance of supporting ancient browsers. Though some of the attributes are already deprecated in HTML5, browsers still support them and the worst that can happen is that they simply won't work. It's probably also possible to use CSS and also the HTML attributes as a fallback. The visual attributes include `bgcolor`, `border`, `color`, `cols`, `height`, `rows`, `shape`, `size`, `width` etc. You can also use tables to give the page a layout (this is how it used to be done back in the day). And of course you may use images for visuals as well, but that may already be an inferior, more bloated solution.
TODO: more more more
## How It Works