kempo-css 1.0.8 → 1.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.
Files changed (44) hide show
  1. package/.github/copilot-instructions.md +165 -0
  2. package/.github/prompts/build-theme-editor.prompt.md +89 -0
  3. package/docs/.config.json +17 -0
  4. package/docs/components/ThemePropertyInput.js +47 -0
  5. package/docs/demo.inc.html +182 -0
  6. package/docs/docs.inc.html +823 -0
  7. package/{examples → docs/examples}/responsive-grid.html +3 -1
  8. package/docs/index.html +105 -0
  9. package/docs/init.js +4 -0
  10. package/docs/kempo-hljs.min.css +1 -0
  11. package/docs/kempo.min.css +1 -0
  12. package/docs/manifest.json +87 -0
  13. package/docs/nav.js +17 -0
  14. package/docs/theme-editor.html +847 -0
  15. package/package.json +9 -6
  16. package/{build.js → scripts/build.js} +75 -2
  17. package/src/components/ThemePropertyInput.js +154 -0
  18. package/src/kempo-hljs.css +125 -0
  19. package/src/kempo.css +1027 -0
  20. package/index.html +0 -1101
  21. package/src/ColorEditor.js +0 -26
  22. package/src/CssVar.js +0 -56
  23. package/src/lit-all.min.js +0 -120
  24. package/theme-builder.html +0 -286
  25. /package/{kempo-hljs.css → docs/kempo-hljs.css} +0 -0
  26. /package/{kempo.css → docs/kempo.css} +0 -0
  27. /package/{media → docs/media}/hexagon.svg +0 -0
  28. /package/{media → docs/media}/icon-maskable.png +0 -0
  29. /package/{media → docs/media}/icon.svg +0 -0
  30. /package/{media → docs/media}/icon128.png +0 -0
  31. /package/{media → docs/media}/icon144.png +0 -0
  32. /package/{media → docs/media}/icon152.png +0 -0
  33. /package/{media → docs/media}/icon16-48.svg +0 -0
  34. /package/{media → docs/media}/icon16.png +0 -0
  35. /package/{media → docs/media}/icon192.png +0 -0
  36. /package/{media → docs/media}/icon256.png +0 -0
  37. /package/{media → docs/media}/icon32.png +0 -0
  38. /package/{media → docs/media}/icon384.png +0 -0
  39. /package/{media → docs/media}/icon48.png +0 -0
  40. /package/{media → docs/media}/icon512.png +0 -0
  41. /package/{media → docs/media}/icon64.png +0 -0
  42. /package/{media → docs/media}/icon72.png +0 -0
  43. /package/{media → docs/media}/icon96.png +0 -0
  44. /package/{media → docs/media}/kempo-fist.svg +0 -0
@@ -0,0 +1,165 @@
1
+ # Code Contribution Guidelines
2
+
3
+ ## Project Structure
4
+
5
+ - All code should be in the `src/` directory, with the exception of npm scripts.
6
+ - All components should be in the `src/components/` directory.
7
+ - All utility function module files should be in the `src/utils/` directory.
8
+ - All documnentation should be in the `docs/` directory. This directory is used by GitHub as the "GitHub Pages", so all links need to be relative, and there will be a build script which copies all code to the `docs/` directory.
9
+
10
+ ## Coding Style Guidelines
11
+
12
+ ### Code Organization
13
+ Use multi-line comments to separate code into logical sections. Group related functionality together.
14
+ - Example: In Lit components, group lifecycle callbacks, event handlers, public methods, utility functions, and rendering logic separately.
15
+
16
+ ```javascript
17
+ /*
18
+ Lifecycle Callbacks
19
+ */
20
+ ```
21
+
22
+ ### Avoid single-use variables/functions
23
+ Avoid defining a variable or function to only use it once; inline the logic where needed. Some exceptions include:
24
+ - recursion
25
+ - scope encapsulation (IIFE)
26
+ - context changes
27
+
28
+ ### Minimal Comments, Empty Lines, and Spacing
29
+
30
+ Use minimal comments. Assume readers understand the language. Some exceptions include:
31
+ - complex logic
32
+ - anti-patterns
33
+ - code organization
34
+
35
+ Do not put random empty lines within code; put them where they make sense for readability, for example:
36
+ - above and below definitions for functions and classes.
37
+ - to help break up large sections of logic to be more readable. If there are 100 lines of code with no breaks, it gets hard to read.
38
+ - above multi-line comments to indicate the comment belongs to the code below
39
+
40
+ No empty lines in css.
41
+
42
+ End each file with an empty line.
43
+
44
+ End each line with a `;` when possible, even if it is optional.
45
+
46
+ Avoid unnecessary spacing, for example:
47
+ - after the word `if`
48
+ - within parentheses for conditional statements
49
+
50
+ ```javascript
51
+ let count = 1;
52
+
53
+ const incrementOdd = (n) => {
54
+ if(n % 2 !== 0){
55
+ return n++;
56
+ }
57
+ return n;
58
+ };
59
+
60
+ count = incrementOdd(count);
61
+ ```
62
+
63
+ ### Prefer Arrow Functions
64
+ Prefer the use of arrow functions when possible, especially for class methods to avoid binding. Use normal functions if needed for preserving the proper context.
65
+ - For very basic logic, use implicit returns
66
+ - If there is a single parameter, omit the parentheses.
67
+ ```javascript
68
+ const addOne = n => n + 1;
69
+ ```
70
+
71
+ ### Module Exports
72
+ - If a module has only one export, use the "default" export, not a named export.
73
+ - Do not declare the default export as a const or give it a name; just export the value.
74
+
75
+ ```javascript
76
+ export default (n) => n + 1;
77
+ ```
78
+ - If a module has multiple exports, use named exports and do not use a "default" export.
79
+
80
+ ### Code Reuse
81
+ Create utility functions for shared logic.
82
+ - If the shared logic is used in a single file, define a utility function in that file.
83
+ - If the shared logic is used in multiple files, create a utility function module file in `src/utils/`.
84
+
85
+ ### Naming
86
+ Do not prefix identifiers with underscores.
87
+ - Never use leading underscores (`_`) for variable, property, method, or function names.
88
+ - Use clear, descriptive names without prefixes.
89
+ - When true privacy is needed inside classes, prefer native JavaScript private fields (e.g., `#myField`) instead of simulated privacy via underscores.
90
+
91
+ ## Components
92
+
93
+ ### Base Component Architecture
94
+
95
+ The project provides three base components for different rendering strategies. Choose the appropriate base component and extend it:
96
+
97
+ #### ShadowComponent
98
+ For components that need shadow DOM encapsulation and automatic `/kempo.css` stylesheet injection.
99
+
100
+ ```javascript
101
+ import ShadowComponent from './ShadowComponent.js';
102
+
103
+ export default class MyComponent extends ShadowComponent {
104
+ render() {
105
+ return html`<p>Shadow DOM content with scoped styles</p>`;
106
+ }
107
+ }
108
+ ```
109
+
110
+ #### LightComponent
111
+ For components that render directly to light DOM without shadow DOM encapsulation.
112
+
113
+ ```javascript
114
+ import LightComponent from './LightComponent.js';
115
+
116
+ export default class MyComponent extends LightComponent {
117
+ renderLightDom() {
118
+ return html`<p>Light DOM content</p>`;
119
+ }
120
+ }
121
+ ```
122
+
123
+ #### HybridComponent
124
+ For components that need both shadow DOM (with automatic `/kempo.css`) and light DOM rendering.
125
+
126
+ ```javascript
127
+ import HybridComponent from './HybridComponent.js';
128
+
129
+ export default class MyComponent extends HybridComponent {
130
+ render() {
131
+ return html`<p>Shadow DOM content</p>`;
132
+ }
133
+
134
+ renderLightDom() {
135
+ return html`<p>Light DOM content alongside natural children</p>`;
136
+ }
137
+ }
138
+ ```
139
+
140
+ **Important:** Always call `super.updated()` when overriding the `updated()` method in LightComponent or HybridComponent to ensure proper rendering.
141
+
142
+ ### Component Architecture and Communication
143
+
144
+ - Use methods to cause actions; do not emit events to trigger logic. Events are for notifying that something already happened.
145
+ - Prefer `el.closest('ktf-test-framework')?.enqueueSuite({...})` over firing an `enqueue` event.
146
+
147
+ - Wrap dependent components inside a parent `ktf-test-framework` element. Children find it via `closest('ktf-test-framework')` and call its methods. The framework can query its subtree to orchestrate children.
148
+
149
+ - Avoid `window` globals and global custom events for coordination. If broadcast is needed, scope events to the framework element; reserve window events for global, non-visual concerns (e.g., settings changes).
150
+
151
+ ## Development Workflow
152
+
153
+ ### Local Development Server
154
+ - **DO NOT** start a development server - one is already running
155
+ - Default port: **8083**
156
+ - Base URL: `http://localhost:8083`
157
+ - Documentation URLs follow the directory/file structure in `docs/` (e.g., `docs/components/color-picker.html` → `http://localhost:8083/components/color-picker.html`)
158
+ - Use this server for all testing and verification
159
+
160
+ ### Testing and Verification
161
+ - **ALWAYS** verify changes using the live documentation on the running server
162
+ - Use Chrome DevTools Protocol (chrome-devtools-mcp) for interactive testing
163
+ - **DO NOT** create one-off test files or framework-less tests
164
+ - Test components in their natural documentation environment
165
+ - Validate both functionality and visual appearance
@@ -0,0 +1,89 @@
1
+ ---
2
+ mode: "agent"
3
+ tools: ['edit', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks', 'chromedevtools/chrome-devtools-mcp/*', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'openSimpleBrowser', 'fetch', 'githubRepo', 'extensions', 'todos', 'runSubagent']
4
+ ---
5
+
6
+ # Theme Editor
7
+
8
+ ## Background
9
+ kempo-css can be customized by the consumer by creating their own theme file (css) which overwrites the CSS Custom Properties defined in `src/kempo.css`, the file should not overwrite the actual style properties of elements, only overwrite CSS Custom Properties.
10
+
11
+ ## Description
12
+
13
+ ### Page Layout
14
+ The theme editor" is a GUI which allows consumers to create and download a theme file. The page should be spit into 3 sections:
15
+ 1. Navigation: The navbar is on top of the page.
16
+ 2. Theme Editor: A set of inputs on the left side of the page, this should be full height (except the navigation) and be independently scrollable.
17
+ - This should have two sections, the top is a download / upload buttons, and a theme select.
18
+ 3. Demo: HTML Elements that serve as examples to the user so they can see how their changes will affect the page. This should also be independently scrollable.
19
+
20
+ ### Changing the theme
21
+ There should be two ways to change the theme.
22
+ - A `k-theme-switcher` component in the navigation bar (supports auto/light/dark) - already in place.
23
+ - A select dropdown on the top of the theme editor which allows the user to choose between "dark" and "light" (no "auto" option). This controls which theme's colors are being edited in the color pickers below.
24
+ - The select dropdown should subscribe to the theme context to stay in sync when the theme changes via the `k-theme-switcher`. When "auto" is detected, resolve it to the actual current theme (light or dark) using the theme util.
25
+
26
+ ## Resources
27
+
28
+ ### Kempo-UI
29
+ The theme editor should be built using the kempo-ui component library, which is based on Lit. Kempo-UI has already been installed as an external library.
30
+ - If new components need to be created for this feature, they should be placed in `src/components/` following the project's base component architecture (ShadowComponent, LightComponent, or HybridComponent).
31
+ - The "theme" utility should be used to get / set the theme and subscribe to theme changes.
32
+ - https://dustinpoissant.github.io/kempo-ui/utils/theme.html
33
+ - The "context" utility should be used to store the theme overwrites and synchronize UI state.
34
+ - https://dustinpoissant.github.io/kempo-ui/utils/context.html
35
+ - The "Color Picker" component should be used in the GUI.
36
+ - https://dustinpoissant.github.io/kempo-ui/components/color-picker.html
37
+ - The "Dialog" component should be used to allow the user to upload an existing theme for editing.
38
+ - https://dustinpoissant.github.io/kempo-ui/components/dialog.html
39
+
40
+ ### chrome-devtools-mcp
41
+ The page is already running at http://localhost:4048/theme-editor.html there is no need to start a server, just use the chrome-devtools-mcp to verify that the theme editor is working exactly as expected.
42
+
43
+ ## Phases
44
+
45
+ 0. Create a custom component `k-theme-property-input` in `src/components/` that handles CSS custom property values.
46
+ - This component should detect if the value is a CSS custom property reference (contains `var(--`).
47
+ - It should provide a toggle/switch to choose between "Custom Value" and "Reference Property".
48
+ - When in "Custom Value" mode for colors, show a `k-color-picker`.
49
+ - When in "Reference Property" mode, show a select dropdown listing all available CSS custom properties (filtered to relevant types, e.g., only color properties for color values).
50
+ - For properties with `light-dark()`, handle both the light and dark values, which may each independently be either a color or a property reference.
51
+ - The component should emit a change event with the full value (e.g., `var(--c_primary)` or `rgb(51, 102, 255)`).
52
+ - Use the chrome-devtools-mcp to verify this component works correctly in isolation before moving on.
53
+ 1. Create a JavaScript object that is the default theme.
54
+ - This can be determined by looking at `src/kempo.css` and seeing what CSS Custom Properties are defined in the `:root` rule.
55
+ - The object structure should store light and dark values separately for properties using `light-dark()`, and preserve `var()` references:
56
+ 2. Create the inputs for the CSS Custom Properties, the default values should be the default values from phase 1.
57
+ - For color CSS Custom Properties that use `light-dark()`, show one `k-theme-property-input` per property. The displayed value should reflect the current editing theme (selected in the theme editor dropdown, not necessarily the applied theme).
58
+ - The `k-theme-property-input` component should handle both direct color values and `var()` references automatically.
59
+ - Group inputs logically: Colors first (primary, secondary, danger, warning, success, backgrounds, text colors), then typography (fonts, sizes, weights), then spacing/layout, then other properties.
60
+ - For each input, add a label showing the CSS variable name (e.g., "Primary Color (--c_primary)").
61
+ - The demo content is already loaded via `<k-import src="./docs.inc.html">` in the right pane and includes examples of all themed elements.
62
+ - Use the chrome-devtools-mcp to verify the page looks correct before moving on to the next phase.s-is
63
+ // ... etc
64
+ }
65
+ ```
66
+ - Log it to the devtools console and verify using the chrome-devtools-mcp before moving on to the next phase.
67
+ 2. Create the inputs for the CSS Custom Properties, the default values should be the default values from phase 1.
68
+ - For color CSS Custom Properties that use `light-dark()`, show one `k-color-picker` per property. The displayed value should reflect the current editing theme (selected in the theme editor dropdown, not necessarily the applied theme).
69
+ - Group inputs logically: Colors first (primary, secondary, danger, warning, success, backgrounds, text colors), then typography (fonts, sizes, weights), then spacing/layout, then other properties.
70
+ - For each color picker, add a label showing the CSS variable name (e.g., "Primary Color (--c_primary)").
71
+ - The demo content is already loaded via `<k-import src="./docs.inc.html">` in the right pane and includes examples of all themed elements.
72
+ - Use the chrome-devtools-mcp to verify the page looks correct before moving on to the next phase.
73
+ 3. Create an event listener that listens for any change on any input, creates a new "theme" object, compares that to the default theme object from phase 1 to create a "diff" object.
74
+ 4. Create a theme css string from the diff object.
75
+ - Convert the diff object back into CSS custom properties with `light-dark()` functions where appropriate.
76
+ - The CSS should be wrapped in a `:root` selector.
77
+ - Apply this theme by injecting it into a `<style id="custom-theme">` tag in the head, replacing any existing custom theme.
78
+ - Save the CSS string to kempo-ui context for later download.
79
+ - Log the CSS string to the devtools console.
80
+ - Use the chrome-devtools-mcp to verify that the page looks correct and the CSS string in the devtools console looks correct:
81
+ - Change a color input for the light theme, verify the page updates immediately when in light mode.
82
+ - Switch to dark theme in the editor dropdown, change a dark color, verify the page updates when in dark mode.
83
+ - Change a non-color input (e.g., font size, spacing) and verify the page updates across both themes.sole looks correct.
84
+ - Change a color input and verify that the page is updating and looks by looking at the demo.
85
+ - Change a non-color input and verify that the page is updating and looks correct by looking at the demo.
86
+ 5. Hookup the "Download" button so that when the user clicks it, it downloads the minimal (diff) theme.
87
+ - If you have a way to verify this automatically attempt it but I might have to verify this manually, im not sure if AI agents can save the file and verify it. Ask me to save the file, i will then attach the theme file to the chat context so you can verify it looks correct.
88
+ 6. Hookup the "Upload" button, it should use the kempo-ui Dialog to open a dialog that allows the user to upload a theme file, then when they click "Apply" it will will update the inputs on the page.
89
+ - If you have a way to verify this automatically attempt it, but I might have to verify this manually.
@@ -0,0 +1,17 @@
1
+ {
2
+ "customRoutes": {
3
+ "/kempo.min.css": "../src/kempo.css",
4
+ "/kempo-hljs.min.css": "../src/kempo-hljs.css",
5
+ "/kempo-ui/**": "../node_modules/kempo-ui/dist/**",
6
+ "/icons/**": "../node_modules/kempo-ui/icons/**"
7
+ },
8
+ "middleware": {
9
+ "logging": {
10
+ "enabled": true,
11
+ "includeResponseTime": true
12
+ },
13
+ "security": {
14
+ "enabled": false
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,47 @@
1
+ import ShadowComponent from"/kempo-ui/components/ShadowComponent.js";import{html,css}from"/kempo-ui/lit-all.min.js";export default class ThemePropertyInput extends ShadowComponent{static properties={propName:{type:String,attribute:"prop-name"},value:{type:String},availableProperties:{type:Array,attribute:"available-properties"},mode:{type:String},initialColor:{type:String,attribute:"initial-color"}};static styles=css`
2
+ :host {
3
+ display: block;
4
+ }
5
+ label {
6
+ display: block;
7
+ margin-bottom: 0.25rem;
8
+ }
9
+ .input-wrapper {
10
+ display: flex;
11
+ gap: 0.5rem;
12
+ align-items: center;
13
+ }
14
+ .mode-select {
15
+ width: 100px;
16
+ flex-shrink: 0;
17
+ }
18
+ .value-input {
19
+ flex: 1;
20
+ }
21
+ `;constructor(){super(),this.propName="",this.value="",this.availableProperties=[],this.mode="color",this.initialColor=""}connectedCallback(){super.connectedCallback(),this.value?.startsWith("var(")&&(this.mode="var")}firstUpdated(){this.attachColorPickerListener()}updated(e){super.updated?.(e),this.attachColorPickerListener()}attachColorPickerListener(){if("color"===this.mode){const e=this.shadowRoot?.querySelector("k-color-picker");e&&!e._hasChangeListener&&(e._hasChangeListener=!0,e.addEventListener("change",this.handleColorChange),e.addEventListener("input",this.handleColorChange))}}handleModeChange=e=>{this.mode=e.target.value,"var"!==this.mode||this.value.startsWith("var(")?"color"===this.mode&&this.value.startsWith("var(")&&(this.value=this.initialColor||"#000000"):this.value=this.availableProperties[0]?`var(${this.availableProperties[0]})`:"",this.emitChange()};handleVarInput=e=>{const t=e.target.value;this.value=t.startsWith("var(")?t:`var(${t})`,this.emitChange()};handleColorChange=e=>{this.value=e.target.value,this.emitChange()};emitChange(){this.dispatchEvent(new CustomEvent("value-change",{detail:{propName:this.propName,value:this.value},bubbles:!0,composed:!0}))}render(){const e=`${this.propName}-datalist`,t=this.value?.startsWith("var(")?this.value.slice(4,-1).trim():"";return html`
22
+ <label>${this.propName}</label>
23
+ <div class="input-wrapper">
24
+ <select class="mode-select" .value=${this.mode} @change=${this.handleModeChange}>
25
+ <option value="var">Var</option>
26
+ <option value="color">Color</option>
27
+ </select>
28
+
29
+ ${"var"===this.mode?html`
30
+ <input
31
+ class="value-input"
32
+ list=${e}
33
+ .value=${t}
34
+ @input=${this.handleVarInput}
35
+ placeholder="--property-name"
36
+ />
37
+ <datalist id=${e}>
38
+ ${this.availableProperties.map(e=>html`<option value=${e}></option>`)}
39
+ </datalist>
40
+ `:html`
41
+ <k-color-picker
42
+ class="value-input"
43
+ value=${this.value}
44
+ ></k-color-picker>
45
+ `}
46
+ </div>
47
+ `}}customElements.define("k-theme-property-input",ThemePropertyInput);
@@ -0,0 +1,182 @@
1
+ <h1>Colors</h1>
2
+ <h2>Background Colors</h2>
3
+ <div class="d-f gap fw mb">
4
+ <div class="p bg-alt">bg-alt</div>
5
+ <div class="p bg-inv">bg-inv</div>
6
+ <div class="p bg-primary tc-on_primary">bg-primary</div>
7
+ <div class="p bg-secondary tc-on_secondary">bg-secondary</div>
8
+ <div class="p bg-success tc-on_success">bg-success</div>
9
+ <div class="p bg-warning tc-on_warning">bg-warning</div>
10
+ <div class="p bg-danger tc-on_danger">bg-danger</div>
11
+ </div>
12
+ <h2>Text Colors</h2>
13
+ <div class="mb">
14
+ <p>Normal text color</p>
15
+ <p class="tc-muted">Muted text color</p>
16
+ <p class="tc-primary">Primary text color</p>
17
+ <p class="tc-secondary">Secondary text color</p>
18
+ <p class="tc-success">Success text color</p>
19
+ <p class="tc-warning">Warning text color</p>
20
+ <p class="tc-danger">Danger text color</p>
21
+ </div>
22
+ <div class="p bg-inv mb">
23
+ <p class="tc-inv">Inverse text color on inverse background</p>
24
+ </div>
25
+
26
+ <h1>Border Colors</h1>
27
+ <div class="d-f gap fw mb">
28
+ <div class="p b">Default border</div>
29
+ <div class="p b bg-inv" style="border-color: var(--c_border__inv);">Inverse border</div>
30
+ </div>
31
+
32
+ <h1>Link Colors</h1>
33
+ <p>
34
+ <a href="#">This is a link</a> - normal link styling
35
+ </p>
36
+ <div class="p bg-inv mb">
37
+ <a href="#" class="tc-link__inv">Inverse link</a> - for use on dark backgrounds
38
+ </div>
39
+
40
+ <h1>Buttons</h1>
41
+ <h2>Button Types</h2>
42
+ <div class="mb">
43
+ <button class="mb mr">button</button>
44
+ <input type="button" value="input" class="mb mr" />
45
+ <input type="submit" value="submit" class="mb mr" />
46
+ <a href="#" class="btn mb mr">a.btn</a>
47
+ </div>
48
+
49
+ <h2>Button Colors</h2>
50
+ <div class="mb">
51
+ <button class="mb mr">Default</button>
52
+ <button class="primary mb mr">Primary</button>
53
+ <button class="secondary mb mr">Secondary</button>
54
+ <button class="success mb mr">Success</button>
55
+ <button class="warning mb mr">Warning</button>
56
+ <button class="danger mb mr">Danger</button>
57
+ </div>
58
+
59
+ <h2>Button Sizes</h2>
60
+ <div class="d-f fw ai-center mb">
61
+ <button class="small mb mr">Small</button>
62
+ <button class="mb mr">Normal</button>
63
+ <button class="large mb mr">Large</button>
64
+ </div>
65
+
66
+ <h2>Button Groups</h2>
67
+ <div class="btn-grp mb">
68
+ <button>One</button>
69
+ <button>Two</button>
70
+ <button>Three</button>
71
+ </div>
72
+
73
+ <h1>Inputs</h1>
74
+ <div class="mb">
75
+ <label>Text Input</label>
76
+ <input type="text" placeholder="Enter text..." />
77
+ </div>
78
+ <div class="mb">
79
+ <label>Textarea</label>
80
+ <textarea placeholder="Enter longer text..."></textarea>
81
+ </div>
82
+ <div class="mb">
83
+ <label>Select</label>
84
+ <select>
85
+ <option>Option 1</option>
86
+ <option>Option 2</option>
87
+ <option>Option 3</option>
88
+ </select>
89
+ </div>
90
+ <div class="mb">
91
+ <input type="checkbox" id="demo-check1" />
92
+ <label for="demo-check1" class="checkbox">Checkbox 1</label>
93
+ <input type="checkbox" id="demo-check2" />
94
+ <label for="demo-check2" class="checkbox">Checkbox 2</label>
95
+ </div>
96
+ <div class="mb">
97
+ <input type="radio" name="demo-radios" id="demo-rad1" />
98
+ <label for="demo-rad1" class="checkbox">Radio 1</label>
99
+ <input type="radio" name="demo-radios" id="demo-rad2" />
100
+ <label for="demo-rad2" class="checkbox">Radio 2</label>
101
+ </div>
102
+
103
+ <h1>Focus & Effects</h1>
104
+ <p>Click or tab to inputs and buttons to see focus styles.</p>
105
+ <div class="mb">
106
+ <input type="text" class="mb mr" placeholder="Focus me..." />
107
+ <button class="mb mr">Focus me</button>
108
+ <button class="primary mb mr">Focus me</button>
109
+ </div>
110
+ <div class="p bg-alt drop-shadow mb" style="display: inline-block;">
111
+ Drop shadow effect
112
+ </div>
113
+
114
+ <h1>Typography</h1>
115
+ <h2>Headings</h2>
116
+ <h1>Heading 1</h1>
117
+ <h2>Heading 2</h2>
118
+ <h3>Heading 3</h3>
119
+ <h4>Heading 4</h4>
120
+ <h5>Heading 5</h5>
121
+ <h6>Heading 6</h6>
122
+
123
+ <h2>Paragraph Text</h2>
124
+ <p>This is a paragraph of text demonstrating the base font family and size. The quick brown fox jumps over the lazy dog. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
125
+ <p><small>This is small text.</small></p>
126
+ <p><strong>This is bold text.</strong></p>
127
+
128
+ <h2>Monospace</h2>
129
+ <p><code>Inline code uses the monospace font family.</code></p>
130
+ <pre>Preformatted text also uses monospace.</pre>
131
+
132
+ <h1>Spacing & Layout</h1>
133
+ <h2>Key</h2>
134
+ <ul class="mb">
135
+ <li><strong class="tc-success">Green</strong> = Padding</li>
136
+ <li><strong class="tc-warning">Orange</strong> = Margins</li>
137
+ </ul>
138
+
139
+ <h2>Padding</h2>
140
+ <div class="mb">
141
+ <div class="d-ib bg-success mr mb p"><div class="d-ib bg-alt pq">p</div></div>
142
+ <div class="d-ib bg-success mr mb pt"><div class="d-ib bg-alt pq">pt</div></div>
143
+ <div class="d-ib bg-success mr mb pr"><div class="d-ib bg-alt pq">pr</div></div>
144
+ <div class="d-ib bg-success mr mb pb"><div class="d-ib bg-alt pq">pb</div></div>
145
+ <div class="d-ib bg-success mr mb pl"><div class="d-ib bg-alt pq">pl</div></div>
146
+ <div class="d-ib bg-success mr mb px"><div class="d-ib bg-alt pq">px</div></div>
147
+ <div class="d-ib bg-success mr mb py"><div class="d-ib bg-alt pq">py</div></div>
148
+ </div>
149
+
150
+ <h2>Margins</h2>
151
+ <div class="mb">
152
+ <div class="d-ib bg-warning mr mb p"><div class="d-ib bg-alt pq">m</div></div>
153
+ <div class="d-ib bg-warning mr mb pt"><div class="d-ib bg-alt pq">mt</div></div>
154
+ <div class="d-ib bg-warning mr mb pr"><div class="d-ib bg-alt pq">mr</div></div>
155
+ <div class="d-ib bg-warning mr mb pb"><div class="d-ib bg-alt pq">mb</div></div>
156
+ <div class="d-ib bg-warning mr mb pl"><div class="d-ib bg-alt pq">ml</div></div>
157
+ <div class="d-ib bg-warning mr mb px"><div class="d-ib bg-alt pq">mx</div></div>
158
+ <div class="d-ib bg-warning mr mb py"><div class="d-ib bg-alt pq">my</div></div>
159
+ </div>
160
+
161
+ <h2>Container</h2>
162
+ <p>The <code>.container</code> class limits content width.</p>
163
+
164
+ <h1>Effects & Animation</h1>
165
+ <h2>Border Radius</h2>
166
+ <div class="mb">
167
+ <div class="d-ib bg-alt p mr mb b r">r</div>
168
+ <div class="d-ib bg-alt p mr mb b round">round</div>
169
+ </div>
170
+ <div class="mb">
171
+ <div class="d-ib bg-alt p mr mb b rtl">rtl</div>
172
+ <div class="d-ib bg-alt p mr mb b rtr">rtr</div>
173
+ <div class="d-ib bg-alt p mr mb b rbr">rbr</div>
174
+ <div class="d-ib bg-alt p mr mb b rbl">rbl</div>
175
+ </div>
176
+ <div class="mb">
177
+ <div class="d-ib bg-alt p mr mb b rt">rt</div>
178
+ <div class="d-ib bg-alt p mr mb b rb">rb</div>
179
+ <div class="d-ib bg-alt p mr mb b rl">rl</div>
180
+ <div class="d-ib bg-alt p mr mb b rr">rr</div>
181
+ </div>
182
+ <p><small><strong>Note:</strong> Add <code>0</code> suffix (e.g., <code>r0</code>, <code>rt0</code>) to cancel border radius.</small></p>