Skip to content

Commit 9743d8d

Browse files
curdajdlouhak
authored andcommitted
Feat(web): Add background gradient to Box component #DS-1887
1 parent 0f5a162 commit 9743d8d

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

packages/web/src/scss/components/Box/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,20 @@ You can define background color using utility classes `bg-<color>`.
5959
<div class="bg-secondary">Secondary Background</div>
6060
<div class="bg-tertiary">Tertiary Background</div>
6161
```
62+
63+
## Background Gradient
64+
65+
You can define background gradient using utility classes `bg-gradient-<color>`.
66+
67+
```html
68+
<div class="bg-gradient-primary">Primary Background Gradient</div>
69+
<div class="bg-gradient-secondary">Secondary Background Gradient</div>
70+
```
71+
72+
Responsive values can be set for each prop using utility classes. For example, `bg-gradient-<color>` for mobile, `bg-gradient-tablet-<color>` for tablet, and `bg-gradient-desktop-<color>` for desktop.
73+
74+
```html
75+
<div class="bg-gradient-primary bg-gradient-tablet-secondary bg-gradient-desktop-primary">
76+
Responsive background gradient
77+
</div>
78+
```

packages/web/src/scss/components/Box/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ <h2 class="docs-Heading">With Background Color</h2>
5252
</div>
5353
</section>
5454

55+
<section class="py-900 py-tablet-1000">
56+
<div class="Container">
57+
<h2 class="docs-Heading">With Background Gradient</h2>
58+
<div class="docs-Stack docs-Stack--start">
59+
60+
<p>For demo purposes, the boxes have custom padding.</p>
61+
<div class="bg-gradient-primary p-800">Primary Background Gradient</div>
62+
<div class="bg-gradient-secondary p-800">Secondary Background Gradient</div>
63+
<div class="bg-gradient-primary bg-gradient-tablet-secondary bg-gradient-desktop-secondary p-800">Responsive Background Gradient</div>
64+
</div>
65+
</div>
66+
</section>
67+
5568
<section class="py-900 py-tablet-1000">
5669
<div class="Container">
5770
<h2 class="docs-Heading">With Radius</h2>
27.4 KB
Loading

0 commit comments

Comments
 (0)