Search
Int’l Accounting Standards Body Defines Bitcoin as ‘Intangible Asset’
23.9.2019
Cryptocurrencies like Bitcoin are neither financial assets nor legal tender, says the International Financial Reporting Interpretations Committee
Need to scroll to the top of the page?
2.9.2019
Perhaps the easiest way to offer that to the user is a link that targets an ID on the <html> element. So like...
<html id="top">
<body>
<!-- the entire document -->
<a href="#top">Jump to top of page</a>
...
Can you nest @media and @support queries?
5.8.2019
Yes, you can, and it doesn't really matter in what order. A CSS preprocessor is not required. It works in regular CSS.
This works:
@supports(--a: b) {
@media (min-width: 1px) {
body {
background: red;
}
}
}
And so does this, the reverse nesting of the above:
@media (min-width:...
How much specificity do @rules have, like @keyframes and @media?
31.7.2019
I got this question the other day. My first thought is: weird question! Specificity is about selectors, and at-rules are not selectors, so... irrelevant?
To prove that, we can use the same selector inside and outside of an at-rule and see if it seems to affect specificity.
body {
background:...
CSS :not() with Multiple Classes
22.7.2019
Say you want to select an element when it doesn't have a certain class. That's what the :not() selector is for.
body:not(.home) {
}
But what if there are multiple classes you want to avoid?
There are no logical combinators with :not(), like and or or, but you can chain them, which...
Managing Multiple Backgrounds with Custom Properties
15.7.2019
One cool thing about CSS custom properties is that they can be a part of a value. Let's say you're using multiple backgrounds to pull off a a design. Each background will have its own color, image, repeat, position, etc. It can be verbose!
You have four images:
body {
background-position:
...
How to Section Your HTML
18.6.2019
The sectioning elements in HTML5 are <nav>, <aside>, <article>, and <section>. <body> is also kind of a sectioning element since all content lying inside of it is part of the default document section.
Here is a brief explanation of each sectioning element...
Prevent Page Scrolling When a Modal is Open
3.6.2019
Please stop me if you've heard this one before. You open a modal, scroll through it, close it, and wind up somewhere else on the page than you were when you opened the modal.
That's because modals are elements on a page just like any other. It may stay in place (assuming that's what it's meant...
The Simplest Ways to Handle HTML Includes
30.4.2019
It's extremely surprising to me that HTML has never had any way to include other HTML files within it. Nor does there seem to be anything on the horizon that addresses it. I'm talking about straight up includes, like taking a chunk of HTML and plopping it right into another. For example the...
Smooth Scrolling for Screencasts
13.3.2019
Let's say you wanted to scroll a web page from top to bottom programmatically. For example, you're recording a screencast and want a nice full-page scroll. You probably can't scroll it yourself because it'll be all uneven and jerky. Native JavaScript can do smooth scrolling. Here's a tiny snippet...
Control Icons with Font Size
27.2.2019
Here’s a nifty trick from Andy Bell that now seems a little obvious in hindsight: if you set an SVG to have a width and height of 1em then you can change the size of it with the font-size property.
Try and change the font-size on the body element below to see the icon scale with the text:
...
Jak zjistit body řidiče: Nově to jde snadno přes Portál občana
25.2.2019
Portál občana se rozrostl o dlouho očekávanou novinku a to okamžitý výpis bodového hodnocení řidiče. Nově je zde možné vše zobrazit přímo z administrace bez nutnosti zasílání žádosti o konkrétní výpis skrze datovou schránku.
Na domovské stránce se tak nově po přihlášení ukazuje vedle čísla
Multiple Background Clip
30.1.2019
You know how you can have multiple backgrounds?
body {
background-image:
url(image-one.jpg),
url(image-two.jpg);
}
That's just background-image. You can set their position too, as you might expect. We'll shorthand it:
body {
background:
url(image-one.jpg) no-repeat top right,
...
Toggling Animations On and Off
9.1.2019
A nicely detailed tutorial by Kirupa that gets into how you might provide a UI with persisted options that control whether animations run or not.
The trick is custom properties that control the movement:
body {
--toggle: 0;
--playState: "paused";
}
Which are used within animations...
Your Body Text is Too Small
21.7.2018
Several years ago, there was a big push by designers to increase the font-size of websites and I feel like we’re living in another era of accessibility improvements where a fresh batch of designers are pushing for even larger text sizing today. Take this post by Christian Miller, for example, where...
Scrolling Gradient
13.7.2018
If you want a gradient that changes as you scroll down a very long page, you can create a gradient with a bunch of color stops, apply it to the body and it will do just that.
But, what if you don't want a perfectly vertical gradient? Like you want just the top left corner to change color? Mike...
Little Tip: Draw Your Grid in ASCII in Your CSS Comments for Quick Reference
9.7.2018
Say you declared a grid like this:
body {
display: grid;
grid-template-columns: min-content 1fr;
grid-template-rows: min-content auto min-content;
}
This depends on content, for sure, but how it's likely to play out is like this:
+---+-------------+
| | |
|...
Jak zhubnout: PortraitPro Body 2 vás zbaví tuku i bez činek a drahého fitka
6.3.2018
Sedíte celý den u počítače? • Do posilovny se vám nechce? Tak proč nezhubnout jen virtuálně?
Ústavní soud zrušil některé body EET. Třeba nesmyslnou evidenci bezhotovostních plateb
15.12.2017
Ačkoliv elektronická evidence tržeb EET u nás běží už nějaký pátek, v následujících měsících se nejspíše dočká některých změn. Ústavní soud dnes totiž vyhověl žalobě 41 poslanců a zrušil některé sporné body, které mají přestat platit ke konci příštího roku.
Z hlediska IT je asi nejzajímavější