Skip to content

Commit 48d26fd

Browse files
committed
Run prettier
1 parent 1f4c24b commit 48d26fd

5 files changed

Lines changed: 47 additions & 17 deletions

File tree

typescript/src/renderer/styles/README.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This directory contains the modular CSS architecture for the JSON-DOC renderer.
55
## Architecture
66

77
### File Structure
8+
89
```
910
styles/
1011
├── index.css # Main entry point - imports all modules
@@ -23,64 +24,74 @@ styles/
2324
## Usage
2425

2526
### Default Import
27+
2628
The renderer automatically imports the default styles:
29+
2730
```typescript
28-
import { JsonDocRenderer } from '@json-doc/typescript';
31+
import { JsonDocRenderer } from "@json-doc/typescript";
2932
// Styles are automatically included
3033
```
3134

3235
### Custom Styling
36+
3337
To customize styles, you can:
3438

3539
1. **Override CSS Variables** (recommended):
40+
3641
```css
3742
:root {
3843
--jsondoc-text-primary: #2d3748;
39-
--jsondoc-font-family-sans: 'Inter', sans-serif;
44+
--jsondoc-font-family-sans: "Inter", sans-serif;
4045
--jsondoc-spacing-lg: 20px;
4146
}
4247
```
4348

4449
2. **Import Individual Modules**:
50+
4551
```css
46-
@import '@json-doc/typescript/dist/renderer/styles/variables.css';
47-
@import '@json-doc/typescript/dist/renderer/styles/base.css';
52+
@import "@json-doc/typescript/dist/renderer/styles/variables.css";
53+
@import "@json-doc/typescript/dist/renderer/styles/base.css";
4854
/* Import only what you need */
4955
```
5056

5157
3. **Create Your Own Theme**:
58+
5259
```css
5360
/* my-theme.css */
54-
@import '@json-doc/typescript/dist/renderer/styles/variables.css';
61+
@import "@json-doc/typescript/dist/renderer/styles/variables.css";
5562

5663
:root {
5764
/* Override variables */
5865
--jsondoc-text-primary: #1a202c;
5966
--jsondoc-bg-code: #f7fafc;
6067
}
6168

62-
@import '@json-doc/typescript/dist/renderer/styles/base.css';
69+
@import "@json-doc/typescript/dist/renderer/styles/base.css";
6370
/* Import other modules as needed */
6471
```
6572

6673
## CSS Variables (Design Tokens)
6774

6875
### Colors
76+
6977
- `--jsondoc-text-primary`: Primary text color
70-
- `--jsondoc-text-secondary`: Secondary text color
78+
- `--jsondoc-text-secondary`: Secondary text color
7179
- `--jsondoc-text-muted`: Muted text color
7280
- `--jsondoc-border-light`: Light border color
7381
- `--jsondoc-border-medium`: Medium border color
7482

7583
### Background Colors
84+
7685
- `--jsondoc-bg-code`: Code block background
7786
- `--jsondoc-bg-inline-code`: Inline code background
7887
- `--jsondoc-bg-unsupported`: Unsupported block background
7988

8089
### Text Colors
90+
8191
- `--jsondoc-color-gray` through `--jsondoc-color-red`: Notion-style text colors
8292

8393
### Typography
94+
8495
- `--jsondoc-font-family-sans`: Sans-serif font stack
8596
- `--jsondoc-font-family-mono`: Monospace font stack
8697
- `--jsondoc-font-family-serif`: Serif font stack
@@ -89,9 +100,11 @@ To customize styles, you can:
89100
- `--jsondoc-line-height-*`: Line heights
90101

91102
### Spacing
103+
92104
- `--jsondoc-spacing-xs` through `--jsondoc-spacing-3xl`: Consistent spacing scale
93105

94106
### Layout
107+
95108
- `--jsondoc-page-max-width`: Maximum page width
96109
- `--jsondoc-page-padding-desktop`: Desktop page padding
97110
- `--jsondoc-page-padding-mobile`: Mobile page padding
@@ -100,7 +113,9 @@ To customize styles, you can:
100113
## Theming
101114

102115
### Light/Dark Mode
116+
103117
The styles include automatic dark mode support:
118+
104119
```css
105120
@media (prefers-color-scheme: dark) {
106121
:root {
@@ -111,7 +126,9 @@ The styles include automatic dark mode support:
111126
```
112127

113128
### Manual Theme Classes
129+
114130
Force specific themes using classes:
131+
115132
```html
116133
<div class="jsondoc-theme-light">
117134
<!-- Always light theme -->
@@ -123,7 +140,9 @@ Force specific themes using classes:
123140
```
124141

125142
### Custom Color Schemes
143+
126144
Create your own color schemes:
145+
127146
```css
128147
.my-custom-theme {
129148
--jsondoc-text-primary: #2b6cb0;
@@ -135,11 +154,13 @@ Create your own color schemes:
135154
## Responsive Design
136155

137156
The styles include responsive breakpoints:
157+
138158
- Desktop: Default styles
139159
- Tablet: `max-width: 768px`
140160
- Mobile: `max-width: 480px`
141161

142162
Override responsive behavior:
163+
143164
```css
144165
@media (max-width: 768px) {
145166
:root {
@@ -151,6 +172,7 @@ Override responsive behavior:
151172
## Block-Specific Styling
152173

153174
Each block type has its own CSS class namespace:
175+
154176
- `.notion-text-block`: Paragraph blocks
155177
- `.notion-header-block`: Heading 1 blocks
156178
- `.notion-sub_header-block`: Heading 2/3 blocks
@@ -164,35 +186,38 @@ Each block type has its own CSS class namespace:
164186
## Advanced Customization
165187

166188
### Overriding Specific Components
189+
167190
```css
168191
/* Custom code block styling */
169192
.notion-code-block {
170193
background: var(--my-code-bg);
171194
border: 1px solid var(--my-code-border);
172-
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
195+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
173196
}
174197
```
175198

176199
### Adding Custom Animations
200+
177201
```css
178202
.notion-selectable {
179203
transition: all 0.2s ease;
180204
}
181205

182206
.notion-selectable:hover {
183207
transform: translateY(-1px);
184-
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
208+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
185209
}
186210
```
187211

188212
### Print Styles
213+
189214
```css
190215
@media print {
191216
.json-doc-page {
192217
padding: 0;
193218
max-width: none;
194219
}
195-
220+
196221
.notion-toggle-block {
197222
/* Expand all toggles for print */
198223
}
@@ -202,11 +227,13 @@ Each block type has its own CSS class namespace:
202227
## Browser Compatibility
203228

204229
The styles use modern CSS features:
230+
205231
- CSS Custom Properties (CSS Variables)
206232
- CSS Grid and Flexbox
207233
- CSS Logical Properties
208234

209235
Supports:
236+
210237
- Chrome/Edge 49+
211238
- Firefox 31+
212239
- Safari 9.1+
@@ -223,9 +250,10 @@ For older browser support, consider using a CSS preprocessor to compile variable
223250
## Contributing
224251

225252
When adding new styles:
253+
226254
1. Add design tokens to `variables.css` first
227255
2. Use existing variables instead of hardcoded values
228256
3. Follow the modular structure
229257
4. Test responsive behavior
230258
5. Ensure dark mode compatibility
231-
6. Update this README with new variables or classes
259+
6. Update this README with new variables or classes

typescript/src/renderer/styles/layout.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
.notion-column {
1515
flex: 1;
1616
min-width: 0;
17-
}
17+
}

typescript/src/renderer/styles/media.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
color: var(--jsondoc-text-primary);
4242
font-size: var(--jsondoc-font-size-caption);
4343
margin-top: var(--jsondoc-spacing-md);
44-
}
44+
}

typescript/src/renderer/styles/responsive.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
@media (max-width: 768px) {
44
.json-doc-page {
5-
padding: var(--jsondoc-spacing-2xl) var(--jsondoc-spacing-xl) var(--jsondoc-page-bottom-padding);
5+
padding: var(--jsondoc-spacing-2xl) var(--jsondoc-spacing-xl)
6+
var(--jsondoc-page-bottom-padding);
67
}
78

89
.json-doc-page-title {
@@ -17,7 +18,8 @@
1718

1819
@media (max-width: 480px) {
1920
.json-doc-page {
20-
padding: var(--jsondoc-spacing-xl) var(--jsondoc-spacing-lg) var(--jsondoc-page-bottom-padding);
21+
padding: var(--jsondoc-spacing-xl) var(--jsondoc-spacing-lg)
22+
var(--jsondoc-page-bottom-padding);
2123
}
2224

2325
.json-doc-page-title {
@@ -27,4 +29,4 @@
2729
.json-doc-page-icon {
2830
font-size: 60px;
2931
}
30-
}
32+
}

typescript/src/renderer/styles/table.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
padding: 6px var(--jsondoc-spacing-md);
1919
vertical-align: top;
2020
word-wrap: break-word;
21-
}
21+
}

0 commit comments

Comments
 (0)