Skip to content

Instantly share code, notes, and snippets.

@malarkey
Created January 16, 2025 21:57
Show Gist options
  • Save malarkey/f601f093983392629f4af981899a22a1 to your computer and use it in GitHub Desktop.
Save malarkey/f601f093983392629f4af981899a22a1 to your computer and use it in GitHub Desktop.
5 essential CSS rules to add to any Squarespace website
/*
5 essential CSS rules to add to any Squarespace website
-------------------------------------------------------
Author: Andy Clarke
Studio: https://stuffandnonsense.co.uk
Template store: https://stuffandnonsense.store
*/
html:focus-within {
scroll-behavior: smooth; }
@media screen and (prefers-reduced-motion: reduce) {
html:focus-within {
scroll-behavior: auto;
animation-duration: 1ms !important;
animation-iteration-count: 1 !important;
transition-duration: 1ms !important; }
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important; }
}
body {
min-height: 100vh;
font-feature-settings: "liga" 1, "tnum" 1;
hanging-punctuation: first allow-end last;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
font-smooth: auto; }
[id] {
scroll-margin-top: var(--spacing-r); }
h1, h2, h3, h4 {
text-wrap: balance; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment