Skip to content

Commit

Permalink
Remove 'antialiased' CSS class from root template (#5827)
Browse files Browse the repository at this point in the history
One day, perhaps over a decade ago, it used to bring visual improvement
and consistency to font rendering across browsers and operating systems.

But, over the years, the default subpixel-antialising in browsers/OSes
produces better results than 'antialiased'.

There are many discussions about this on the web, I mention a few:
- google/fonts#1170
- https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth
- https://web.dev/articles/antialiasing-101
- https://en.wikipedia.org/wiki/Subpixel_rendering
  • Loading branch information
rhcarvalho authored Jun 8, 2024
1 parent 55c894d commit 2e06455
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions installer/templates/phx_static/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -940,11 +940,6 @@ select {
color: rgb(63 63 70 / var(--tw-text-opacity));
}

.antialiased {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.transition {
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
</script>
</head>
<body class="bg-white antialiased">
<body class="bg-white">
<%%= @inner_content %>
</body>
</html>

0 comments on commit 2e06455

Please sign in to comment.