diff --git a/apps/docs/content/2-foundations/1-guidelines/2-layout.mdx b/apps/docs/content/2-foundations/1-guidelines/2-layout.mdx
new file mode 100644
index 000000000..04b8121a7
--- /dev/null
+++ b/apps/docs/content/2-foundations/1-guidelines/2-layout.mdx
@@ -0,0 +1,108 @@
+---
+title: Layout
+description: Layout information
+draft: true
+status: in-development
+---
+
+# Layout
+
+## Screen size
+
+Design for small screens first, starting with a single-column layout.
+
+For most types of page, we recommend using either a ‘two-thirds’ or a ‘two-thirds and one-third’ layout. That stops lines of text getting so long that the page becomes difficult to read on desktop devices. This would usually mean no more than 75 characters per line.
+
+Never make assumptions about what devices people are using. Design for different screen sizes rather than specific devices.
+
+## Common layouts
+
+### Two-thirds
+
+
{children}
@@ -115,6 +117,8 @@ const documentComponents: MDXComponents = {
ServiceUnavailable: (props) => ,
ContactDeptOrService: (props) => ,
DeveloperRecommendation: (props) => ,
+ TwoThirds: (props) => ,
+ TwoThirdsOneThird: (props) => ,
};
export function Mdx({ code }: MdxProps) {
diff --git a/apps/docs/src/components/layouts/two-thirds.tsx b/apps/docs/src/components/layouts/two-thirds.tsx
new file mode 100644
index 000000000..4f67fb29a
--- /dev/null
+++ b/apps/docs/src/components/layouts/two-thirds.tsx
@@ -0,0 +1,26 @@
+export function TwoThirds({ children }: { children: React.ReactNode }) {
+ return (
+
+
+ {children}
+
+
+ );
+}
+
+export function TwoThirdsOneThird({
+ left,
+ right,
+}: {
+ left: React.ReactNode;
+ right: React.ReactNode;
+}) {
+ return (
+
+
+ {left}
+ {right}
+
+
+ );
+}
diff --git a/packages/html/ds/tailwind.config.ts b/packages/html/ds/tailwind.config.ts
index 8afffa6a4..65303c6e1 100644
--- a/packages/html/ds/tailwind.config.ts
+++ b/packages/html/ds/tailwind.config.ts
@@ -6,6 +6,13 @@ const config: Config = {
content: ['./src/**/*.html', './src/**/*.ts'],
theme: createTheme(),
plugins: [],
+ safelist: [
+ { pattern: /layout-./ },
+ { pattern: /grid-./ },
+ { pattern: /col-./ },
+ { pattern: /row-./ },
+ { pattern: /gap-./ },
+ ],
};
export default config;
diff --git a/packages/react/ds/src/container/container.tsx b/packages/react/ds/src/container/container.tsx
index 720223408..f862d4f28 100644
--- a/packages/react/ds/src/container/container.tsx
+++ b/packages/react/ds/src/container/container.tsx
@@ -1,3 +1,3 @@
export function Container({ children }: { children: React.ReactNode }) {
- return {children};
+ return {children};
}
diff --git a/packages/react/ds/styles.css b/packages/react/ds/styles.css
index 84c536893..827e9e8ac 100644
--- a/packages/react/ds/styles.css
+++ b/packages/react/ds/styles.css
@@ -23,7 +23,31 @@
}
@layer components {
- /* Header Styles */
+ /* Typography */
+
+ /* End Typography */
+
+ /* Layout */
+
+ .gi-layout-container {
+ @apply gi-container gi-mx-auto
+ }
+
+ .gi-layout-column-container {
+ @apply gi-flex gi-flex-col md:gi-flex-row
+ }
+
+ .gi-layout-column-2-3 {
+ @apply gi-w-full md:gi-w-2/3
+ }
+
+ .gi-layout-column-1-3 {
+ @apply gi-w-full md:gi-w-1/3
+ }
+
+ /* End Layout */
+
+ /* Header */
#GovieHeader {
#MenuContainer:has(#SearchTrigger:checked) ~ #SearchContainer {
@@ -46,53 +70,44 @@
position: fixed;
}
}
+
+ /* End Header */
/* Tabs */
- [name='tabs']:checked + label {
- @apply gi-border-solid gi-border-gray-200 gi-border-x-xs gi-border-t-xs gi-border-b-0 gi-bg-white gi-px-5 gi-py-3 gi--mt-2 gi-no-underline;
+ [name="tabs"]:checked+label {
+ @apply gi-border-solid gi-border-gray-200 gi-border-x-xs gi-border-t-xs gi-border-b-0 gi-bg-white gi-px-5 gi-py-3 gi--mt-2 gi-no-underline
}
- [name='tabs']:hover + label > * {
- @apply gi-decoration-lg;
+ [name="tabs"]:hover+label>* {
+ @apply gi-decoration-lg
}
- [name='tabs']:focus + label > * {
- @apply gi-outline gi-outline-transparent gi-bg-yellow-400 gi-outline-2 gi-shadow gi-shadow-yellow-400;
+ [name="tabs"]:focus+label>* {
+ @apply gi-outline gi-outline-transparent gi-bg-yellow-400 gi-outline-2 gi-shadow gi-shadow-yellow-400
}
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(1):checked)
- [role='tabpanel']:nth-of-type(2),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(2):checked)
- [role='tabpanel']:nth-of-type(3),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(3):checked)
- [role='tabpanel']:nth-of-type(4),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(4):checked)
- [role='tabpanel']:nth-of-type(5),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(5):checked)
- [role='tabpanel']:nth-of-type(6),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(6):checked)
- [role='tabpanel']:nth-of-type(7),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(7):checked)
- [role='tabpanel']:nth-of-type(8),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(8):checked)
- [role='tabpanel']:nth-of-type(9),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(9):checked)
- [role='tabpanel']:nth-of-type(10),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(10):checked)
- [role='tabpanel']:nth-of-type(11),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(11):checked)
- [role='tabpanel']:nth-of-type(12),
- div.gi-tabs:has([role='tablist'] [name='tabs']:nth-of-type(12):checked)
- [role='tabpanel']:nth-of-type(13) {
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(1):checked) [role="tabpanel"]:nth-of-type(2),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(2):checked) [role="tabpanel"]:nth-of-type(3),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(3):checked) [role="tabpanel"]:nth-of-type(4),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(4):checked) [role="tabpanel"]:nth-of-type(5),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(5):checked) [role="tabpanel"]:nth-of-type(6),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(6):checked) [role="tabpanel"]:nth-of-type(7),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(7):checked) [role="tabpanel"]:nth-of-type(8),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(8):checked) [role="tabpanel"]:nth-of-type(9),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(9):checked) [role="tabpanel"]:nth-of-type(10),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(10):checked) [role="tabpanel"]:nth-of-type(11),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(11):checked) [role="tabpanel"]:nth-of-type(12),
+ div.gi-tabs:has([role="tablist"] [name="tabs"]:nth-of-type(12):checked) [role="tabpanel"]:nth-of-type(13) {
display: block;
- }
-
+ }
/* End Tabs */
-}
+
+ /* Input File */
-/* Input File */
-
-input[type='file' i] {
- @apply gi-appearance-none gi-bg-[initial] gi-cursor-default gi-items-baseline gi-text-ellipsis gi-text-start gi-whitespace-pre;
+ input[type='file' i] {
+ @apply gi-appearance-none gi-bg-[initial] gi-cursor-default gi-items-baseline gi-text-ellipsis gi-text-start gi-whitespace-pre;
+ }
+
+ /* End Input File */
}
diff --git a/packages/react/ds/tailwind.config.ts b/packages/react/ds/tailwind.config.ts
index 6b1e4bdcf..45568c18a 100644
--- a/packages/react/ds/tailwind.config.ts
+++ b/packages/react/ds/tailwind.config.ts
@@ -6,6 +6,13 @@ const config: Config = {
content: ['./src/**/*.ts', './src/**/*.tsx'],
theme: createTheme(),
plugins: [],
+ safelist: [
+ { pattern: /layout-./ },
+ { pattern: /grid-./ },
+ { pattern: /col-./ },
+ { pattern: /row-./ },
+ { pattern: /gap-./ },
+ ],
};
export default config;