breakouts 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,14 @@ It provides utilities for containers, full-bleed sections, breakout content, and
14
14
  npm install breakouts
15
15
  ```
16
16
 
17
+ In your SCSS entry point:
18
+
19
+ ```scss
20
+ @use 'breakouts' as *;
21
+ ```
22
+
23
+ Note: breakouts automatically forwards all core modules from src/index.scss. You can also import individual modules as needed for tree-shaking.
24
+
17
25
  ## 📦 Framework Structure
18
26
 
19
27
  Breakouts includes a small set of layout-focused utility classes to help you build responsive and consistent page structures.
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../src/theme/_colors.scss","../src/base/_reset.scss","../src/base/_typography.scss","../src/layout/_container.scss","../src/layout/_full-bleed.scss","../src/layout/_breakouts.scss","../src/layout/_grid.scss"],"names":[],"mappings":"AAGA;EACI;EACA;EACA;EACA;EACA;EACA;;;AAIJ;AAAA;EAEI;EACA;EACA;EACA;EACA;EACA;;;AAIJ;AAAA;EAEI;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACI;IACI;IACA;IACA;IACA;IACA;IACA;;;AAKR;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;ACxEJ;AACA;AAAA;AAAA;EAGI;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;ACJJ;EACI,aAde;EAef,WAba;EAcb,aAbe;EAcf;EACA;EACA;;;AAMA;EACI,WApBG;EAqBH;EACA;EACA;EACA;;;AALJ;EACI,WApBG;EAqBH;EACA;EACA;EACA;;;AALJ;EACI,WApBG;EAqBH;EACA;EACA;EACA;;;AALJ;EACI,WApBG;EAqBH;EACA;EACA;EACA;;;AALJ;EACI,WApBG;EAqBH;EACA;EACA;EACA;;;AALJ;EACI,WApBG;EAqBH;EACA;EACA;EACA;;;AAIR;EACI;;;AAGJ;EACI;EACA;;AAEA;EACI;;;AC9CR;EACI;EACA;EACA;;;ACHJ;EACI;EACA;EACA;;;ACHJ;EACI;EACA;;;ACFJ;EACI;EACA;EACA;EACA;EACA;;;AAIJ;EACI;EACA,uBACI;EACJ;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAIJ;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI","file":"breakouts.css"}
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../src/theme/_colors.scss","../src/base/_reset.scss","../src/base/_typography.scss","../src/layout/_container.scss","../src/layout/_full-bleed.scss","../src/layout/_breakouts.scss","../src/layout/_grid.scss"],"names":[],"mappings":"AAGA,MACI,4BACA,yBACA,sBACA,uBACA,yBACA,2BAIJ,kBAEI,4BACA,yBACA,sBACA,uBACA,yBACA,2BAIJ,oBAEI,4BACA,yBACA,sBACA,uBACA,yBACA,2BAIJ,mCACI,6BACI,4BACA,yBACA,sBACA,uBACA,yBACA,4BAKR,eACI,yCAGJ,YACI,sCAGJ,YACI,sCAGJ,cACI,wCAGJ,WACI,wBAGJ,iBACI,8BAGJ,YACI,yBCvEJ,qBAGI,sBACA,SACA,UAGJ,UAEI,SACA,UACA,WACA,kBAGJ,KACI,aACA,iCACA,gBCJJ,KACI,YAde,qBAef,UAba,KAcb,YAbe,IAcf,wBACA,yCACA,SAMA,GACI,UApBG,QAqBH,gBACA,mBACA,gBACA,wBALJ,GACI,UApBG,QAqBH,gBACA,mBACA,gBACA,wBALJ,GACI,UApBG,OAqBH,gBACA,mBACA,gBACA,wBALJ,GACI,UApBG,QAqBH,gBACA,mBACA,gBACA,wBALJ,GACI,UApBG,SAqBH,gBACA,mBACA,gBACA,wBALJ,GACI,UApBG,KAqBH,gBACA,mBACA,gBACA,wBAIR,EACI,cAGJ,EACI,2BACA,0BAEA,QACI,6BC9CR,WACI,mBACA,gBACA,oBCHJ,YACI,YACA,gBACA,2BCHJ,UACI,YACA,sCCFJ,MACI,8BACA,gCACA,2BACA,0BACA,4CAIJ,gBACI,aACA,sBACI,iNACJ,eAGJ,SACI,oBAGJ,QACI,mBAGJ,SACI,oBAGJ,MACI,iBAIJ,MACI,aACA,2EACA,eAEA,QACI,cAIR,cACI","file":"breakouts.min.css"}
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "breakouts",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "A personal SCSS/CSS layout utility framework.",
5
5
  "main": "dist/breakouts.css",
6
6
  "files": [
7
- "dist/breakouts.css",
8
- "dist/breakouts.min.css"
7
+ "breakouts.scss",
8
+ "src/",
9
+ "dist/"
9
10
  ],
10
11
  "scripts": {
11
12
  "build": "sass src/_index.scss dist/breakouts.css --style=expanded && sass src/_index.scss dist/breakouts.min.css --style=compressed && cp dist/breakouts.css docs/breakouts.css",
@@ -0,0 +1,12 @@
1
+ // Theme and configurable variables
2
+ @forward 'theme/colors';
3
+
4
+ // Base styles
5
+ @forward 'base/reset';
6
+ @forward 'base/typography';
7
+
8
+ // Layout utilities
9
+ @forward 'layout/container';
10
+ @forward 'layout/full-bleed';
11
+ @forward 'layout/breakouts';
12
+ @forward 'layout/grid';
@@ -0,0 +1,22 @@
1
+ /* Basic reset */
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
6
+ margin: 0;
7
+ padding: 0;
8
+ }
9
+
10
+ html,
11
+ body {
12
+ margin: 0;
13
+ padding: 0;
14
+ width: 100%;
15
+ overflow-x: hidden;
16
+ }
17
+
18
+ body {
19
+ padding: 2rem;
20
+ font-family: system-ui, sans-serif;
21
+ line-height: 1.6;
22
+ }
@@ -0,0 +1,49 @@
1
+ // src/base/_typography.scss
2
+
3
+ // Default font settings
4
+ $font-family-base: system-ui,
5
+ sans-serif !default;
6
+ $font-size-base: 1rem !default;
7
+ $line-height-base: 1.6 !default;
8
+
9
+ // Heading scale
10
+ $headings: (h1: 2.25rem,
11
+ h2: 1.75rem,
12
+ h3: 1.5rem,
13
+ h4: 1.25rem,
14
+ h5: 1.125rem,
15
+ h6: 1rem) !default;
16
+
17
+ body {
18
+ font-family: $font-family-base;
19
+ font-size: $font-size-base;
20
+ line-height: $line-height-base;
21
+ color: var(--color-text);
22
+ background-color: var(--color-background);
23
+ margin: 0;
24
+ }
25
+
26
+ // Headings
27
+ @each $heading,
28
+ $size in $headings {
29
+ #{$heading} {
30
+ font-size: $size;
31
+ line-height: 1.2;
32
+ margin: 2rem 0 1rem;
33
+ font-weight: 600;
34
+ color: var(--color-text);
35
+ }
36
+ }
37
+
38
+ p {
39
+ margin: 1rem 0;
40
+ }
41
+
42
+ a {
43
+ color: var(--color-primary);
44
+ text-decoration: underline;
45
+
46
+ &:hover {
47
+ color: var(--color-secondary);
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+ @forward 'src/index';
@@ -0,0 +1,4 @@
1
+ .breakout {
2
+ width: 100vw;
3
+ margin-left: calc(-1 * (100vw - 100%) / 2);
4
+ }
@@ -0,0 +1,5 @@
1
+ .container {
2
+ margin-inline: auto;
3
+ max-width: 72rem;
4
+ padding-inline: 1rem;
5
+ }
@@ -0,0 +1,5 @@
1
+ .full-bleed {
2
+ width: 100vw;
3
+ margin-left: 50%;
4
+ transform: translateX(-50%);
5
+ }
@@ -0,0 +1,46 @@
1
+ :root {
2
+ --gap: clamp(1rem, 6vw, 3rem);
3
+ --full: minmax(var(--gap), 1fr);
4
+ --feature: minmax(0, 5rem);
5
+ --popout: minmax(0, 2rem);
6
+ --content: min(50ch, 100% - var(--gap) * 2);
7
+ }
8
+
9
+ // Breakouts Grid (named lines)
10
+ .breakouts-grid {
11
+ display: grid;
12
+ grid-template-columns:
13
+ [full-start] var(--full) [feature-start] var(--feature) [popout-start] var(--popout) [content-start] var(--content) [content-end] var(--popout) [popout-end] var(--feature) [feature-end] var(--full) [full-end];
14
+ gap: var(--gap);
15
+ }
16
+
17
+ .content {
18
+ grid-column: content;
19
+ }
20
+
21
+ .popout {
22
+ grid-column: popout;
23
+ }
24
+
25
+ .feature {
26
+ grid-column: feature;
27
+ }
28
+
29
+ .full {
30
+ grid-column: full;
31
+ }
32
+
33
+ // Standard Grid (for .grid and .grid--full compatibility)
34
+ .grid {
35
+ display: grid;
36
+ grid-template-columns: 1fr minmax(0, var(--container-max-width, 64rem)) 1fr;
37
+ gap: var(--gap);
38
+
39
+ >* {
40
+ grid-column: 2;
41
+ }
42
+ }
43
+
44
+ .grid--full>* {
45
+ grid-column: 1 / -1;
46
+ }
@@ -0,0 +1,74 @@
1
+ // src/theme/_colors.scss
2
+
3
+ // Default (light mode)
4
+ :root {
5
+ --color-background: #ffffff;
6
+ --color-surface: #f0f0f0;
7
+ --color-text: #111111;
8
+ --color-muted: #666666;
9
+ --color-primary: #0055ff;
10
+ --color-secondary: #0033aa;
11
+ }
12
+
13
+ // Forced dark mode
14
+ .dark,
15
+ .dark :root {
16
+ --color-background: #111111;
17
+ --color-surface: #1a1a1a;
18
+ --color-text: #eeeeee;
19
+ --color-muted: #aaaaaa;
20
+ --color-primary: #88b0ff;
21
+ --color-secondary: #cdd9ff;
22
+ }
23
+
24
+ // Forced light mode
25
+ .light,
26
+ .light :root {
27
+ --color-background: #ffffff;
28
+ --color-surface: #f0f0f0;
29
+ --color-text: #111111;
30
+ --color-muted: #666666;
31
+ --color-primary: #0055ff;
32
+ --color-secondary: #0033aa;
33
+ }
34
+
35
+ // Automatic dark mode (only if not forcing)
36
+ @media (prefers-color-scheme: dark) {
37
+ :root:not(.light):not(.dark) {
38
+ --color-background: #111111;
39
+ --color-surface: #1a1a1a;
40
+ --color-text: #eeeeee;
41
+ --color-muted: #aaaaaa;
42
+ --color-primary: #88b0ff;
43
+ --color-secondary: #cdd9ff;
44
+ }
45
+ }
46
+
47
+ // Utility classes
48
+ .bg-background {
49
+ background-color: var(--color-background);
50
+ }
51
+
52
+ .bg-surface {
53
+ background-color: var(--color-surface);
54
+ }
55
+
56
+ .bg-primary {
57
+ background-color: var(--color-primary);
58
+ }
59
+
60
+ .bg-secondary {
61
+ background-color: var(--color-secondary);
62
+ }
63
+
64
+ .text-text {
65
+ color: var(--color-text);
66
+ }
67
+
68
+ .text-background {
69
+ color: var(--color-background);
70
+ }
71
+
72
+ .text-muted {
73
+ color: var(--color-muted);
74
+ }