Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just use css #38

Closed
badlydrawnrob opened this issue Mar 3, 2019 · 1 comment
Closed

Just use css #38

badlydrawnrob opened this issue Mar 3, 2019 · 1 comment

Comments

@badlydrawnrob
Copy link
Owner

badlydrawnrob commented Mar 3, 2019

Note to self: Anki will use css, html, minimal compiling, minimal code.

After struggling with bugs via Stylus lang compiler (stalled or dead project), Jeet (dead project), Less css, a little Sass and reading around, I've come to the conclusion to just use css wherever possible.

  • Yes, the syntax can be ugly
  • Yes, it's pretty hard to remember sometimes
  • Yes, it's not perfect
  • Yes, preprocessors have gone a long way to pushing css forward

But, all this comes at a cost:

  • High cognitive load for (in my opinion) little gain.
  • Complicated functions and cleverness seem simple on the surface, but obfuscate code.
  • CSS is not a programming language and we should probably stop treating it so.1
  • Visual styling is different to logic, so unless there's a huge overhaul of language design (or something new comes along) I think we have to be ok with CSS being a less-than-perfect language.2
  • Packages, software, languages come and go — so be careful what you depend on.3

One of the first books I read on web design was "Don't make me think" which is all about Keeping It Simple Stupid! At this point in my life, I have zero motivation to keep up with trends — the less time I spend on a computer, the better. Life is there to be enjoyed not obsessing over minutia.

The web moves in cycles like any trend, but it seems humans have a tendency to overcomplicate for the sake of "progress". Sometimes complexity is necessary, but more often than not, we can strip it out for a far more simple, sane, alternative.

Footnotes

  1. You could argue the opposite and I'm not trying to belittle a CSS coder in any way — it's really flippin' hard to get right once your UI and state become complex, so a good CSSer is worth it. I however, tend to try and keep things simple — I'll save Material Design for mobile apps (if at all).

  2. And use it in a light way, not trying to be too clever. I don't like Javascript, and less, sass, etc feel like using javascript — messy. I understand a little Lisp and Python, so I'm not a complete philistine, but trying to wrestle CSS into a javascript-like language I feel is a mistake. I like the way Elm lang is headed and admire it's creator's ethos, but I'm not 100% convinced with elm/html or elm-css either. Wherever possible, keep things simple and just use plain HTML and CSS!

  3. CSS has moved on and now includes some functionality preprocessors were trying to solve — even nesting is now in fashion!

@badlydrawnrob
Copy link
Owner Author

badlydrawnrob commented Mar 3, 2019

I also want to say a quick fuck you to IE6+ (I'm enjoying Edge's read aloud feature, however); and a tentative introduction to Cut Code Down which has some (very opinionated, but) interesting ideas about code minimalism.

@badlydrawnrob badlydrawnrob pinned this issue Mar 3, 2019
badlydrawnrob added a commit that referenced this issue Mar 3, 2019
- delete stylus
- install less
- convert stylus to less/css
- convert $variables to var(--variables)
- delete twig hack
- use print-first.css file (until I convert to less)
- copy variables from print-first-css
- minor edit to --spacing- variables
@badlydrawnrob badlydrawnrob unpinned this issue Aug 8, 2019
@badlydrawnrob badlydrawnrob mentioned this issue Aug 19, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant