govuk-frontend
Version:
GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
2 lines (1 loc) • 2.62 kB
Source Map (JSON)
{"version":3,"sources":["../../../src/govuk/objects/_template.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB;EACE,+BAA+B;EAC/B;IACE,0EAA0E;IAC1E,+CAA+C;IAC/C,8DAA8D;;IAE9D,0EAA0E;IAC1E,8DAA8D;IAC9D,8BAAsB;OAAtB,2BAAsB;YAAtB,sBAAsB;;IAEtB,sEAAsE;IACtE,sCAAsC;IACtC,CAAC;IACD,0EAA0E;IAC1E,kGAAkG;IAClG,iCAAiC;IACjC,CAAC;IACD,4EAA4E;IAC5E,yEAAyE;IACzE,oEAAoE;IACpE,+EAA+E;IAC/E,+CAA+C;IAC/C;MACE,oCAAoC;;MAEpC;QACE,qBAAqB;MACvB;IACF;;IAEA,yEAAyE;IACzE,mEAAmE;IACnE;MACE,kBAAkB;IACpB;EACF;;EAEA,+BAA+B;EAC/B;IACE,2EAA2E;IAC3E,iBAAiB;IACjB,SAAS;IACT,yEAAyE;IACzE,0DAA0D;EAC5D;AACF","file":"_template.scss","sourcesContent":["@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/template\") {\n // Applied to the <html> element\n .govuk-template {\n // Set the overall page background colour to the same colour as used by the\n // footer to give the illusion of a long footer.\n background-color: govuk-functional-colour(template-background);\n\n // Prevent automatic text sizing, as we already cater for small devices and\n // would like the browser to stay on 100% text zoom by default.\n text-size-adjust: 100%;\n\n // Add scroll padding to the top of govuk-template but remove it if the\n // exit this page component is present.\n //\n // This is a solution to exit this page potentially failing WCAG SC 2.4.12:\n // Focus Not Obscured (https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html)\n // due to it's sticky positioning.\n //\n // This will apply scroll-padding-top in any browsers that don't support :has\n // (https://caniuse.com/css-has). This is part of the reason we do this in\n // a \"wrong way round\" way as we hypothesise that the risks of having\n // scroll-padding unnecessarily is better than risking not having scroll-padding\n // and needing it to account for exit this page.\n @supports (position: sticky) {\n scroll-padding-top: govuk-spacing(9);\n\n &:not(:has(.govuk-exit-this-page)) {\n scroll-padding-top: 0;\n }\n }\n\n // Force the scrollbar to always display in IE, to prevent horizontal page\n // jumps as content height changes (e.g. autocomplete results open).\n @media screen {\n overflow-y: scroll;\n }\n }\n\n // Applied to the <body> element\n .govuk-template__body {\n // The default margins set by user-agents are not required since we have our\n // own containers.\n margin: 0;\n // Set the overall body of the page back to the typical background colour.\n background-color: govuk-functional-colour(body-background);\n }\n}\n"]}