Bad CSS in JS

Een artikel, ongeveer 5 jaren geleden geplaatst onder css, react, style, javascript, standards, simple, simplicity, npm, packages & coffeeandorange.

I tried to understand the argument made for styled components vs. ‘traditional’ CSS. But when reviewing these arguments I found out that they typically use bad code as proof for their point.

See e.g. the following SCSS code:

$blue = #5DBCD2;

@mixin button-styles($bg-color, $color) {
  background: $bg-color;
  color: $color;
  border: none;
  border-radius: 0.20em;
  &:hover{
      background: darken($bg-color, 6%);
      cursor: pointer;
  }
}

.button {
  @include button-styles(#ddd, black)
}

.button--primary {
  @include button-styles($blue, white)
}

To pair with a simple component along the lines of:

const Buttons = props => (
  
    Default
    Primary
  
)
export default Buttons

The suggested alternative is:

import themeVars from "myTheme"
import styled from "styled-components"
import { darken } from "polished"

const B...

Ga verder met lezen en/of reageer...

Op de hoogte blijven?

Maandelijks maak ik een selectie artikelen en zorg ik voor wat extra context bij de meer technische stukken. Schrijf je hieronder in:

Mailfrequentie = 1x per maand. Je privacy wordt serieus genomen: de mailinglijst bestaat alleen op onze servers.

“If something is too complex to understand, it must be wrong”

Een artikel, meer 8 jaar geleden geplaatst onder coding, quote, inspiration, simplicity, software & complexity.

While looking for the source of another quote (something along the lines of “If it takes you too long, you're probably doing it wrong”, which I recall having picked up in the Rails community (if you recognize it, please let me know)) I found the following bold statement. We're not talking science here, we're talking software development (actually this guy is talking Java Spring development):

> “If something is too complex to understand, it must be wrong”

from Arjen Poutsma

Some background on this quote can be found on this Xebia website.

Yep, I'm working on a project that seems to have grown way too complex for what it actually should have been.

Happy coding ;)

Ga verder met lezen en/of reageer...

Why I stopped using OpenOffice.org

Een artikel, ongeveer 14 jaren geleden geplaatst onder ipad, work, app, internet, mac, office, openoffice.org, productivity & simplicity.

As promised. There was a time when I was a true OpenOffice.org fanatic. I even helped actively promoting it by redesigning the homepage . Although I'm still a fan of opensource and open document
storage which ideally should lead to a world in which anyone can use
open software and exchange documents freely without any barriers. Still, I'm no longer typing this in opensource software. I'm typing this in Google -how evil- Docs (update may 2017: Google Docs has been replaced by Apple's notes and iAWriter / Notational Velocity, the latter being markdown based).

It's not that I'm a big fan of Google Docs, but it makes a difference that OpenOffice.org, and other Office systems for that matter, aren't able to make. Not stand alone, nor in a usable way in combination with a proper operating system:

  • Relieving me from worrying about storage
  • Boot insanely fast (…

Ga verder met lezen en/of reageer...

murb blog