Adam Schwartz
adamschwartz.co · Personal blog · on HN since 2013
Adam Schwartz, a front-end developer, writes about CSS, browser DevTools tricks, and small web UI experiments.
What HN saysCommenters recommend his Magic of CSS tutorial as a refresher and a foundation for understanding CSS, and praise his console logging page.
15HN people shared it
9linked it in comments
18stories submitted
551story points
8 months agolast shared
2013people per year2026
Most-shared posts
- 1The Magic of CSS11 people · 114 points · first shared 2014 · 17 comments on HN
- 2Console.log with style2 people · 236 points · first shared 2013 · 56 comments on HN
- 3Two pane app2 people · first shared 2014
- 4Chrome Inspector Detector1 people · 176 points · first shared 2013 · 86 comments on HN
- 5Show HN: Chrome-style Tabs in HTML/CSS/ES61 people · 9 points · first shared 2016 · discussion on HN
- 6The Magic of CSS1 people · 3 points · first shared 2014 · 3 comments on HN
- 7Sci Fi Coder1 people · 3 points · first shared 2013 · discussion on HN
- 8Learn how the browsers lays out elements1 people · 2 points · first shared 2014 · discussion on HN
- 9Apple Watch drawing UI1 people · 2 points · first shared 2015 · discussion on HN
- 10The Magic of CSS1 people · 2 points · first shared 2014 · discussion on HN
- 11Show HN: Weather app with temp (23°) in favicon1 people · 2 points · first shared 2026 · discussion on HN
- 12Show HN: A Practical CSS Textbook1 people · 1 points · first shared 2014 · discussion on HN
- 13JavaScript/CSS playground, URL persisted contents1 people · 1 points · first shared 2022 · discussion on HN
- 14Homepage1 people · first shared 2014
- 15Potions.css1 people · first shared 2015
What HN people wrote when they linked it
adamschwartz · 2014-11-10
No doubt, at a certain point it does come down to aesthetic preference.
Using a border-bottom to achieve the look you’re describing is totally a valid preference. One potential advantage to the border-bottom technique is
the way it can be used to make a link stand out. In fact, I use this link styling on my personal website for that reason [1].
(Note: when using a border-bottom, I’d recommend using a slightly larger line-height so that the line still seems associated with the text above it and not the text below it. This is one of the pitfalls described in the original Medium post [2].)
Unfortunately, aside from iOS 8, normal text-decoration underline links have the descender crossing problem.
I absolutely took this into consideration when designing SmartUnderline. SmartUnderline literally only applies itself to links with text-decoration underline, nothing else. It even tries to ensure other conditions which make the transformation favorable (display inline, solid background color, etc.).
Ultimately I think the before-and-after on the SmartUnderline website tells the best story [3]. No doubt one may appreciate other, very different link styles. (For example, just using a different text color to denote _link_ is a perfectly valid and commonly used technique.) But if you’re using text-decoration underline already, this just makes those links look better.
I think blogs, news articles and wikis are some of the primary examples of where these links look best. Anywhere…
declank · 2019-04-22
Happy easter :) If you already know some HTML/CSS I recommend https://adamschwartz.co/magic-of-css/
I often use it as a refresher
vogt · 2016-09-27
Thanks! I don't know of anything to speak of like Tony's courses but they look great and I will try them.
http://adamschwartz.co/magic-of-css/ This material, while not a course per se, was really integral to me understanding just how CSS works at a foundational level. The interactivity was very helpful to me.
https://www.udacity.com/course/intro-to-html-and-css--ud304 If you are really at a true beginner level, Udacity's Intro to HTML and CSS was phenomenal, and free. They cover everything I think you need to really get started, and as you seemed to enjoy the video material, I imagine you will enjoy this.
ryderm · 2013-07-10
I thought that this list was pretty great. I don't write much js, but http://adamschwartz.co/log/ looks awesome.
sfeng · 2015-04-14
Take a look at Magic of CSS: http://adamschwartz.co/magic-of-css/
asb · 2015-01-05
Adam Schwartz's Magic of CSS has a nice trick for getting the same effect without needing a custom font.
See it in action at http://adamschwartz.co/magic-of-css/potions/two-pane-app/
The relevant CSS is in http://adamschwartz.co/magic-of-css/css/potions.css:
.mock-paragraph b {
display: -moz-inline-stack;
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
zoom: 1;
*display: inline;
background: rgba(0, 0, 0, 0.1);
width: 3.125em;
height: 0.5em;
margin-right: 0.3125em;
margin-bottom: 0.3125em; }
.mock-paragraph b:nth-last-child(4n+1) {
width: 4.5625em; }
.mock-paragraph b:nth-last-child(10n+1) {
width: 0.875em; }
.mock-paragraph b:nth-last-child(9n+1) {
width: 5em; }
zackbloom · 2014-10-03
Magic of CSS might be of some help: http://adamschwartz.co/magic-of-css/
swah · 2014-04-01
Nice. But when I tried the http://adamschwartz.co/magic-of-css/potions/two-pane-app/, you get a little of scrolling on the right pane. Why does that happen?
(I'm making a similar layout and had to start doing stuff in JS...)
p4bl0 · 2014-03-31
This is a nice link, but it would have been better to link directly to the content http://adamschwartz.co/magic-of-css/ rather than the github repos.