Skip to content

Commit 95cb22d

Browse files
authored
Merge pull request #426 from nuejs/dev
1.0.0-RC.2
2 parents cb38768 + 5617cb7 commit 95cb22d

File tree

104 files changed

+2765
-1370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2765
-1370
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
*.zip
21
*.gz
2+
.env

packages/examples/simple-blog/@global/colors.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
:root {
23

34
/* slate gray */
@@ -12,10 +13,6 @@
1213
--main-500: #3b82f6;
1314
--main-600: #2563eb;
1415

15-
/* gradients */
16-
--pink-gradient: linear-gradient(#e879f9, #ec4899);
17-
--blue-gradient: linear-gradient(#0ea5e9, #67e8f9);
18-
1916
/* special colors */
2017
--marker: #ffff7a;
2118
}

packages/examples/simple-blog/@global/layout.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
/* all reset/normalization you need */
2+
/* CSS reset */
33
*, *::before, *::after {
44
box-sizing: border-box;
55
}
@@ -35,7 +35,7 @@ body {
3535
> header { margin-bottom: 2rem }
3636

3737
> section {
38-
max-width: 650px;
38+
max-width: 700px;
3939
margin: 0 auto;
4040
}
4141
}

packages/examples/simple-blog/@global/typography.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ a {
3131
font-weight: 500;
3232
color: var(--gray-900);
3333

34-
&[aria-selected] {
34+
&[aria-current] {
3535
text-decoration: 2px underline var(--main-500);
3636
text-underline-offset: 8px;
3737
}

packages/examples/simple-blog/@library/cards.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11

2+
/* generic wrapper decorations */
3+
4+
/* gradients */
5+
:root {
6+
--pink-gradient: linear-gradient(#e879f9, #ec4899);
7+
--blue-gradient: linear-gradient(#0ea5e9, #67e8f9);
8+
}
9+
210
.pink, .blue {
311
background-image: var(--pink-gradient);
412
padding: 3em 0 0 3em;
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11

2-
ul:has(time) {
2+
/*
3+
Reusable gallery component. Used on front page
4+
*/
5+
6+
.gallery {
7+
margin-block: 4rem;
38
list-style: none;
4-
margin: 4em 0;
5-
padding: 0;;
9+
padding: 0;
610

7-
8-
li {
9-
margin-bottom: 3em;
10-
}
11+
li { margin-bottom: 10% }
1112

1213
figure {
1314
transition: transform .1s;
14-
align-items: center;
15+
align-items: flex-start;
1516
display: flex;
16-
margin: 1em 0;
1717
gap: 3rem;
18-
margin: 0;
1918
&:hover { transform: scale(1.01) }
19+
20+
@media(width < 900) {
21+
img { display: none }
22+
}
2023
}
2124

2225
time {
@@ -31,11 +34,13 @@ ul:has(time) {
3134
font-size: 1.05em;
3235
font-weight: 500;
3336
line-height: 1.5;
34-
margin: .3em 0 0;
37+
margin: 0;
3538
}
3639

40+
p { margin-block: .5em }
41+
3742
img {
38-
max-width: 12em;
43+
max-width: 18em;
3944
border-radius: 4px;
4045
}
4146
}

packages/examples/simple-blog/blog/class-naming-strategies.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
title: CSS class naming strategies for scaleable dashboard design
33
og: img/dashboard-3.png
44
thumb: img/dashboard-thumb.png
5-
date: 2024-03-13
5+
date: 2024-08-13
66
credits: ui8
77
---
88

9-
In web development, CSS and design work hand-in-hand to create compelling user experiences. CSS brings designs to life digitally, translating visual mockups into actual rendered elements. But CSS also informs the design process itself. Understanding its capabilities and limitations allows designers to craft effective layouts and interfaces.
9+
In web development, CSS and design work hand-in-hand to create compelling user experiences. CSS brings designs to life digitally, translating visual mockups into actual rendered elements.
1010

1111
## Keep them short
1212

@@ -39,6 +39,12 @@ On the development side, CSS itself involves visual design skills. Bringing a la
3939

4040
Overall, CSS is a uniquely visual language, with a direct impact on user-facing design. By embracing its connection to the design process, both designers and developers can build interfaces that are engaging and "CSS-native". The closer these roles work together, the better the end result. (edited)
4141

42+
43+
## Conclusion
44+
45+
In conclusion, thoughtfully naming CSS classes, IDs, and other selectors is an important part of keeping stylesheets scalable and maintainable. Use semantic, descriptive names that communicate what a selector is styling. Implement methodical naming conventions and structures for better organization.
46+
47+
4248
``` .pink
4349
.pink {
4450
background-image: linear-gradient(#e879f9, #ec4899);
@@ -54,10 +60,4 @@ Overall, CSS is a uniquely visual language, with a direct impact on user-facing
5460
}
5561
```
5662

57-
## Conclusion
58-
59-
In conclusion, thoughtfully naming CSS classes, IDs, and other selectors is an important part of keeping stylesheets scalable and maintainable. Use semantic, descriptive names that communicate what a selector is styling. Implement methodical naming conventions and structures for better organization.
60-
61-
[! img/dashboard-2.png]
62-
6363
Avoid repetitive and overly specific names by separating structural styles from visual ones. And don’t be afraid to chain multiple classes together for more modular and flexible selectors.

packages/examples/simple-blog/blog/color-strategies.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,24 @@ title: Practical strategies for using colors in CSS
33
credits: BalkanBrothers
44
thumb: img/colors-thumb.png
55
og: img/colors-2.jpg
6-
date: 2024-05-23
6+
date: 2024-11-23
77
---
88

9-
Working with color is one of the most fun parts of web design. But if you don't use them right in your CSS code, colors can also tank a site's usability and accessibility. In this post, we'll explore simple, real-world tips for effectively using color in your stylesheets.
9+
Working with color is one of the most fun parts of web design. In this post, we'll explore simple, real-world tips for effectively using color in your stylesheets.
10+
11+
12+
13+
## How to create a foolproof color palette
14+
15+
Choosing the right colors for a website can be tricky. Get one wrong and your entire design can feel off. Luckily, there are some simple strategies to create a foolproof web color palette:
16+
17+
- **Limit your palette** — Stick to just 2-4 core colors for most sites. Too many colors look disjointed.
18+
19+
- **Focus on one dominant hue** — Pick one main color and derive the rest of the palette from it. This creates cohesion.
20+
21+
- **Use color wheel relationships** — Choose adjacent or complementary colors on the wheel for built-in harmony.
22+
23+
- **Consider tone and contrast** — Include light, medium and dark tones for visual interest. Test contrast for accessibility.
1024

1125
``` css .blue
1226
/* Tab styling */
@@ -26,19 +40,7 @@ Working with color is one of the most fun parts of web design. But if you don't
2640
}
2741
```
2842

29-
## How to create a foolproof color palette
30-
31-
Choosing the right colors for a website can be tricky. Get one wrong and your entire design can feel off. Luckily, there are some simple strategies to create a foolproof web color palette:
3243

33-
- **Limit your palette** — Stick to just 2-4 core colors for most sites. Too many colors look disjointed.
34-
35-
- **Focus on one dominant hue** — Pick one main color and derive the rest of the palette from it. This creates cohesion.
36-
37-
- **Use color wheel relationships** — Choose adjacent or complementary colors on the wheel for built-in harmony.
38-
39-
- **Consider tone and contrast** — Include light, medium and dark tones for visual interest. Test contrast for accessibility.
40-
41-
[image img/colors-1.png]
4244

4345
Considering the different formatting options, you can optimize CSS color usage for any need. Use hex for one-off values, RGBA where you require opacity control, HSL for color adjustments, variables for theming, and preprocessor operations for transformations. With the right format, implementing colors in CSS becomes much more flexible and manageable.
4446

@@ -65,4 +67,22 @@ When adding color in CSS, you have a few formatting options to choose from. Each
6567

6668
They allow for millions of specific color values in a compact 6-character string. But RGB and HSL values also have advantages. RGB provides an easy way to adjust opacity with the alpha channel. And HSL makes it simple to tweak hue, saturation and lightness independently.
6769

70+
``` css .blue
71+
/* Tab styling */
72+
[role=tablist] {
73+
background: rgba(0, 0, 0, .7);
74+
background-size: 3.8em;
75+
> padding: .7em 1.3em 0;
76+
> overflow: hidden;
77+
> display: flex;
78+
79+
a {
80+
color: #fff9;
81+
padding: .2em 1em .4em;
82+
font-size: 90%;
83+
cursor: pointer;
84+
}
85+
}
86+
```
87+
6888
For colors tied to theme values, CSS custom properties (variables) are extremely useful. You can update colors site-wide just by changing the variable values. Preprocessors like Sass take this a step further, allowing color operations like lightening and darkening right in the stylesheet.
-180 KB
Binary file not shown.
-25.9 KB
Loading

0 commit comments

Comments
 (0)