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.
11
questions
6
votes
0
answers
243
views
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:
...
8
votes
9
answers
1k
views
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 ...
7
votes
1
answer
384
views
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:
<...
2
votes
1
answer
343
views
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 ...
1
vote
1
answer
205
views
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 ...
26
votes
9
answers
3k
views
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 ...
10
votes
2
answers
498
views
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 ...
12
votes
4
answers
3k
views
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.
17
votes
25
answers
4k
views
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:
...
2
votes
3
answers
441
views
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 ...
4
votes
1
answer
2k
views
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 ...