Questions tagged [css]

This challenge is related to the CSS language. Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
6 votes
0 answers

Shortest CSS selector to select ALL html elements, without using asterisk *

What is the shortest selector (by character count) to select ALL html elements on a web page, without using asterisk (*)? Some examples are the following: ...
user3163495's user avatar
8 votes
9 answers

Compile TailwindCSS to CSS

TailwindCSS is a utility that lets one write CSS code using only HTML classes, which are then converted to CSS code with the Tailwind compiler. Ordinarily, one would write CSS in a separate file from ...
noodle man's user avatar
  • 5,527
7 votes
1 answer

Is there any less code way to make a leaf (eye) shape in CSS?

I'm trying to solve a CSS challenge. It contains a rotated leaf shape (looks like an eye). Score for the challenge depends on amount of characters of the code. Here's my way to make a leaf shape: <...
j-0-n-e-z's user avatar
  • 171
2 votes
1 answer

Crazy Blazin' DOM Injection

Introduction This problem is a challenge that has to do with DOM manipulation at scale and overcoming some issues that may be inherent in dealing with the DOM. This challenge is interesting because ...
Dodzi Dzakuma's user avatar
1 vote
1 answer

Hiding elements with CSS only [closed]

In the following markup without changing it or using JS, implement the behavior to show only the ul element of div which name is ...
snowfinch27's user avatar
26 votes
9 answers

CSS Color Golf!

You are a web developer, and your boss has decided to update the company's website. He has decided that less color is better, but he wants the site to look the same. You justly decide that he has no ...
mbomb007's user avatar
  • 23.3k
10 votes
2 answers

Compute the specificity of a CSS selector

Today, your task is to write a program (or a function) that accepts a string and outputs (or returns) four integers. Input The input string is a CSS3 selector, and can contain basically any Unicode ...
xem's user avatar
  • 5,827
12 votes
4 answers

Worst Abuse of CSS? [closed]

What is some of the coolest/best/worse abuses of CSS? For example, these shapes, or using multiple box-shadows to make pixel art. popularity-contest ending on 16/04/14.
930913's user avatar
  • 153
17 votes
25 answers

Random CSS Color code

This blog post about generating random CSS color codes in JavaScript have multiple solutions for generating a random color in JavaScript. The shortest I can find is this: ...
Mohsen's user avatar
  • 825
2 votes
3 answers

Unholy Grail Layout (Reverse Holy Grail Layout)

The Holy Grail Layout in CSS, is a full height, 3 column layout which consists of a fluid central column, and two side columns with fixed widths. Your Task is Simple! Reverse it, make a fixed width ...
Madara's Ghost's user avatar
4 votes
1 answer

Smallest Javascript CSS Selector Engine [closed]

Create a small acceptably efficient JS CSS selector engine. Please post size of script, and function to call preferable $(selector,context) style. EDIT: All major browsers support ...
William's user avatar
  • 346