m455.casa

Trying out an early web look for my homepage

2021-04-18

You may have noticed that my website looks like an awful 1990s website. This is intentional, and I love it.

I love making silly websites with awful CSS styles, but I have always steered away from doing this on my personal homepage, so today I am trying it out!

Living with a smaller CSS code base

One of the nicest things about this new CSS theme is that I don’t have to worry about nested styles or elements that much, other than pres, and codes, but that’s more about how Pandoc renders code blocks than anything. For example, maybe you have a CSS class tip, which has a background-color: blue; style, and your links are also blue. Now you have to add something like .tip a { color: white; } to your style sheet, so you can actually see links when they are inside of tip divs. After a while, you end up going down this wild rabbit hole of trying to figure out what looks bad with what, which usually results in making some silly “hidden” page like my CSS test page that no one is supposed to know about. Woops! With this awful theme, I no longer have to worry about that kind of stuff!

Another great thing about this theme is the grey background! I have noticed that it’s not only easier on the eyes than a white background, but it also kind of works as an alternate to a dark theme, because it’s not as daunting to look at in a darker room at night. Plus, the grey makes it look even more like those awesome early HTML 2.0-era websites from the 90s! Maybe the 90s had it right with all of the grey interfaces they had back then, it just works everywhere!

While I’m at it, since I’m going for a whole 90s look, that means I can add more things like ASCII characters to style things. For example, instead of using nav a { margin-right: 10px;} to separate my navigation links in my header, now I just use slashes. Hell yeah!

One of my other favourite things about this new CSS theme is that I styled pres, .examples, .tips, .notes, and .warnings with just one style, instead of creating separate background-colors for each. Now they are all contained in this little rule, which just renders them as having a black border!:

pre, .example, .tip, .note, .notice, .warning {
    border: 1px solid black;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}

Things I had to keep

There were a few things I had to keep CSS style-wise, mostly for my technical writing portfolio. Technical writing doesn’t need to look flashy, but it does need proper formatting. In this case, Pandoc puts images inside of an HTML figure element, and creates a figcaption element from the image caption text in Markdown under the img element. I’m not sure about other browsers, but in Firefox, this renders images and figures as having a significant left margin, causing things to look messy, and sometimes confusing as to whether or not an image is part of a set of instructions or not. An added unfortunate side effect is that Pandoc takes the image caption from Markdown and still uses it as alt text in the HTML element, before the figcaption. This causes screen readers to say the image caption twice, so the overcompensation of having alt text and figcaptions having the same text is actually making images less accessible.

Okay, that was a very big aside. Basically, what I had to do was add these two lines in to fix the unwanted indentation of images and figures:

figure {
    margin-left: 0;
    margin-right: 0;
}

img {
    max-width: 100%;
}

Not a big deal!

Other important styles I that I had to carry on over from my flashier CSS theme were how the pre and code elements were styled, so my portfolio samples didn’t look messy, and so code blocks didn’t wrap when they weren’t supposed to. To do this, I added an overflow: auto; to my pre elements, so code blocks scrolled when long lines occurred, instead of wrapping. To preserve white space, I also had to add a pre code { white-space: pre; }. This is because Pandoc takes code blocks and converts them to <pre><code>...</code></pre>, instead of just converting them to <pre>s. Pandoc also adds some tiny CSS tweaks if you look at the generated source. One of the tweaks it adds is a code { white-space: pre-wrap; }, which preserves white space, but also wraps code if it goes passed the max-width value. This is good for inline code, but not for code blocks, because you don’t want anything to wrap, you want it to display as-as for copy-and-pasting purposes, and to improve readability. My rule for pre code ... above fixes this problem.

Since the year is actually 2021, and people use mobile phones obsessively, I also added a media query, so mobile views had some margin around the outside of the text, so text wasn’t cramped up against the edge of phone screens:

@media only screen and (max-width: 700px) {
    body {
        margin: 10px;
    }
}

Ugly webpages as a form of expression

I’m no artist, but I love being able to have a place on the internet that resembles me. I am organized, but my constant hobby of learning new tech things and programming keeps me in a volatile mindset where I feel comfortable with breaking things, or having things constantly change, and I think this theme resembles that really well.

Another upside to having a crappy-looking theme, is it encourages others that, they too, can make webpages, and they don’t have to be graphics designs to have a place of their own on the web. I curse Facebook for ruining the whole mindset of wanting to have a place on the web. I understand not everyone wants this, but I think it’s really fun, and if you are afraid that you can’t make a web page, I’m telling you can, and you’re fully capable. I’ve got a B.A. in applied linguistics and discourse studies, not computer science. I made my way here through tinkering and exploration, and so can you! Make shitty things you love, and thrive on change! Write things on the internet that don’t require “like”s or comments, start your own not-stagram using HTML. You can upload images to your computer when you get home, you don’t need to do it instantly when you are out on your phone to show your friends that cool thing you want to share. Explore friend’s websites, instead of waiting for notifications.

On search engine optimization, ads, and trackers

Hey there, I don’t show up as a first result on search engines. I’m fine with that! Hell, if I had too much traffic, this small server would probably become sluggish. I’m not writing for the world, I’m writing for friends or people who might be interested in my writing. If I don’t get traffic, no big deal. I’m not trying to make money here. I just enjoy writing, so I don’t need ads. Plus, ads often come with trackers, and I want to respect my users.

By not having ads, search engine optimization, and the trackers that often come with those two things, this website loads fast, even on slower, older, or less-powerful machines.

I think I’m done with this blog post

Well, that was really fun to write about. I didn’t actually have a lot of that in my mind when I started writing. It’s nice to have new ideas emerge while you write.

If you enjoyed this blog post, you’ll probably enjoy this blog post as well.