UNPKG

@cbpds/web-components

Version:
101 lines (90 loc) 1.83 kB
/* * Caution: "global styles" get injected into every component and can cause file size bloat. * These should only include SASS variables and mixins that are not written out to CSS directly */ /* Prevent iPhones from messing up the font size in landscape mode */ html { -moz-text-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none; } html:focus-within { scroll-behavior: smooth; } /* Set core body defaults */ body { min-height: 100vh; text-rendering: optimizeSpeed; line-height: 1.5; } /* Box sizing rules */ *, *::before, *::after { box-sizing: border-box; } /* Remove default margin */ body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; } /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ ul[role=list], ol[role=list] { list-style: none; margin: 0; padding: 0; } /* A elements that don't have a class get default styles */ a:not([class]) { text-decoration-skip-ink: auto; } /* Make images easier to work with */ img, picture { max-width: 100%; display: block; } img:not([height]) { height: auto; /* Preserve aspect ratio */ } /* Inherit fonts for inputs and buttons */ input, button, textarea, select, address { font: inherit; letter-spacing: inherit; word-spacing: inherit; } /* Anything that has been anchored to should have extra scroll margin */ :target { scroll-margin-block: 5ex; } /* Remove all animations and transitions for people that prefer not to see them */ @media (prefers-reduced-motion: reduce) { html { scroll-behavior: initial; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }