2023-06-03
Tips and Tricks.
All #accessibility #cloud9 #codepen #concept #css #css-basic #css-flex #css-grid #data-url #html #html-form #inspirations #ios #javascript #lang-zh #layout #link #mobile #mobile-web #mysql #php #php-basic #podcast #progress-enhancement #python #resilient #resources #swift #ui-design #user-media #video #wordpress
2023-06-03
2020-12-05
2020-11-11
2019-06-02
The scroll-snap CSS has updated to new syntax. Here is a demo of using the latest syntax of scroll-snap and also making it mobile friendly.
2018-11-01
https://paulmillr.com/posts/using-dark-mode-in-css/
/* Text and background color for light mode */
body {
color: #333;
}
/* Text and background color for dark mode */
@media (prefers-color-scheme: dark) {
body {
color: #ddd;
background-color: #222;
}
}
Example code from Paul Miller.
2018-10-27
2018-10-23
This CSS Diner game is a good starting point to learn selector.
2018-10-21
Demonstration of querying and setting responsive styles to navigation with exactly 4 items and 5 or more items. The font-size is smaller when there are more items in the navigation. The grey border simulates the website shown in narrow width screen. Original idea from A List ApartβQuantity Queries for CSS.
2018-01-06
The difference happens when there are not enough content to fill up all columns.
When the screen is wide enough to fill in more "minmax(200px, 1fr)" columns, auto-fill
will fill extra empty 200px width columns.
When it is auto-fit
, extra column works only where there is content there. So there wonβt be any extra empty columns in auto-fit
.
2018-01-04
In this example, we create the block-grid effect by using CSS grid grid-template-columns: repeat(auto-fill, minmax(200px, 1fr))
.
2017-05-10
I created an example that demonstrates block-grid by using Flexbox.
2017-04-30
A quick demo:
2017-04-29
CSS priority is determined by how specific the selector is.
2017-04-19
*{
box-sizing: border-box;
}
2016-09-25
.hyphenate {
Β overflow-wrap: break-word;
Β word-wrap: break-word;
Β -webkit-hyphens: auto;
Β -ms-hyphens: auto;
Β -moz-hyphens: auto;
Β hyphens: auto;
}