
That’s what Donnie D’Amato asks in a recent post:
You are asked to build a website but you can use only 4 CSS properties, what are those?
This sparked a lively discussion among the CSS-Tricks team. It’s akin to the question, “if you could only take one album with you on a remote island…” and everyone had their own take, showcasing the diverse, non-linear nature of thinking like a front-end developer.
It seems like a straightforward question, but as Donnie points out, it requires strategy. For instance, if spacing is a priority, do you choose margin
or padding
? Or perhaps you focus on layout and select gap
as part of a flexbox strategy, which means committing to display
as one of your choices. These decisions can quickly limit your options!
Our answers were initially varied, but converged as the discussion continued, with everyone bringing different priorities to the table. I’ll share each person’s initial reactions because they reveal a lot about individual priorities and compromises in a situation with tight constraints.
Juan Diego Rodriguez
Juan and I had similar choices:
font
: Prioritizes typography with this shorthand property.padding
: Adds breathing space and visual separation.background
: Offers numerous styling options in a compact form.color
: Enhances visual hierarchy.
He considered swapping:
Thinking about switching
color
withplace-items
, since it works in block elements.grid
would needdisplay
, though).
Discover more from WIREDGORILLA
Subscribe to get the latest posts sent to your email.
Discover more from WIREDGORILLA
Subscribe to get the latest posts sent to your email.