This commit is contained in:
Miloslav Ciz 2024-04-24 15:10:32 +02:00
parent 55671625ef
commit a958ed0006
15 changed files with 1828 additions and 1753 deletions

4
css.md
View file

@ -2,9 +2,9 @@
{ Check out our cool CSS styles in the wiki consoomer edition. ~drummyfish }
Cascading Style Sheets (CSS, *cascading* because of the possible style [hierarchy](hierarchy.md)) is a computer language for styling documents (i.e. defining their visual appearance), used mainly on the [web](www.md) for giving websites ([HTML](html.md) documents) their look. The language is standardized by [W3C](w3c.md). CSS is NOT a [programming language](programming_language.md), it's merely a language that says things about visual presentation such as "headings should use this font" or "background should have this color"; it is one of the three main languages a website is written in: [HTML](html.md) (for writing the document), CSS (for giving the document a specific look) and [JavaScript](js.md) ([programming language](programming_language.md) for the website's scripts). As of 2024 the latest CSS specification is version 2.1 from 2016, version 3 is being worked on.
Cascading Style Sheets (CSS, *cascading* because of the possible style [hierarchy](hierarchy.md)) is a [computer](computer.md) [language](language.md) for styling documents (i.e. defining their visual appearance), used mainly on the [web](www.md) for giving websites ([HTML](html.md) documents) their look. The language is standardized by [W3C](w3c.md) (the consortium established for making such standards). CSS is NOT a [programming language](programming_language.md), it's merely a language that defines attributes of visual presentation such as "headings should use this font" or "background should have this color"; it is one of the three main languages a website is written in: [HTML](html.md) (for writing the document), CSS (for giving the document a specific look) and [JavaScript](js.md) ([programming language](programming_language.md) for the website's scripts). As of 2024 the latest CSS specification is version 2.1 from 2016, version 3 is being worked on.
A website is not required to have a CSS style, without it it will just use the plain default look (which is mostly [good enough](good_enough.md) for communicating any information, but won't impress normies), though only boomers and hardcore [minimalists](minimalism.md) nowadays have websites without any CSS at all. Similarly a single HTML website may use several styles or allow switching between them -- this is thanks to the fact that the style is completely separate from the underlying document (you can take any document's style and apply it to any other document) AND thanks to the rules that say which style will take precedence over which (based on which one is more specific etc.), allowing usage of multiple styles at once (creating the "cascades" the name refers to). In theory a web browser may even allow the user to e.g. apply his own CSS style to given website (e.g. a half blind guy may apply style with big font, someone reading in dark will apply "dark mode" style and so on), though for some reason browsers don't really do this.
A website is not required to have a CSS style, without it it will just have the plain default look (which is mostly [good enough](good_enough.md) for communicating any [information](information.md), but won't impress normies), though only boomers and hardcore [minimalists](minimalism.md) nowadays have websites without any CSS at all (and we applaud them for such [minimalism](minimalism.md)). Similarly a single HTML website may use several styles or allow switching between them -- this is thanks to the fact that the style is completely separate from the underlying document (you can in theory take any document's style and apply it to any other document) AND thanks to the overriding rules that say which style will take precedence over which (based on which one is more specific etc.) -- using multiple style sheets at once creates the "cascades" the name refers to. In theory a web browser may even allow the user to apply his own CSS style to given website (e.g. a half blind guy may apply style with big font, someone reading in dark will apply "dark mode" style and so on), though for some reason browsers don't really do this (well, it seems like the original intent of being able to do good things like this was reworked by capitalists that rather see CSS more as a tool to apply more marketing styling and, of course, a capitalist won't want the user to change how his site looks because he might for example hide ads or annoying flashing buttons the capitalist paid hard money for).
Back in the boomer web days -- basically before the glorious year 2000 -- there was no CSS. Well, it was around, but support was poor and no one used it (or needed it for that matter). People cared more for sharing [information](information.md) than pimping muh graphics. Sometimes people needed to control the look of their website to some degree though, for example in an image gallery it's good to have thumbnail sizes the same, so HTML itself included some simple things to manipulate the looks (e.g. the `width` property in the `img` tag). People also did hacks such as raping tables or spamming the `<br />` tags or using [ASCII art](ascii_art.md) to somehow force displaying something how they wanted it. However as [corporations](corporation.md) started to invade the web, they naturally wanted more [consumerism](consumerism.md), flashing lights and brainwas... ummm... [marketing](marketing.md). They wanted to redefine the web from "collection of interlinked documents" or a "global database" to something more like "virtual billboard space" or maybe "gigantic electronic shopping center", which indeed they did. So they supported more work on CSS, more browsers started to support it and normies with blogs jumped on the train too, so CSS just became standard. On one hand CSS allows nice things, you can restyle your whole website with a single line change, but it is still [bloat](bloat.md), so beware, use it wisely (or rather don't use it -- you can never go wrong with that).