Skip to content

Commit 12ffda8

Browse files
committed
Add classes to define borders in only one side
1 parent 0031350 commit 12ffda8

File tree

8 files changed

+38
-6
lines changed

8 files changed

+38
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Additionally, you can modify the opacity of the colors the `pure-bg-alpha-*` cla
4848

4949
### Borders
5050

51-
You can define borders using the class `.pure-bd-*`, where `*` can be any number between 1 and 5, defining the width (in pixels) of the border. By default the border will be solid and black.
51+
You can define borders using the classes `.pure-bd-*` / `.pure-bd-bottom-*` / `.pure-bd-left-*` / `.pure-bd-right-*` / `.pure-bd-top-*`, where `*` can be any number between 1 and 5, defining the width (in pixels) of the border. By default the border will be solid and black.
5252

5353
To change the style of a border you can use classes `.pure-bd-solid` / `.pure-bd-dotted` / `.pure-bd-dashed`.
5454

demo.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ <h3>Border widths</h3>
8888
<div class="pure-p-2 pure-bd-4">pure-bd-4</div>
8989
<br>
9090
<div class="pure-p-2 pure-bd-5">pure-bd-5</div>
91+
<br>
92+
<div class="pure-p-2 pure-bd-bottom-1">pure-bd-bottom-1</div>
93+
<br>
94+
<div class="pure-p-2 pure-bd-left-1">pure-bd-left-1</div>
95+
<br>
96+
<div class="pure-p-2 pure-bd-right-1">pure-bd-right-1</div>
97+
<br>
98+
<div class="pure-p-2 pure-bd-top-1">pure-bd-top-1</div>
9199

92100
<h3>Border styles</h3>
93101

dist/all.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/all.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/border.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/border.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "purecss-utilities",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Utility CSS classes that complement PureCSS",
55
"main": "index.js",
66
"scripts": {

src/shared/_border.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
11
// .pure-bd-1 | .pure-bd-2 | .pure-bd-3 | .pure-bd-4 | .pure-bd-5
2+
// .pure-bd-bottom-1 | .pure-bd-bottom-2 | .pure-bd-bottom-3 | .pure-bd-bottom-4 | .pure-bd-bottom-5
3+
// .pure-bd-left-1 | .pure-bd-left-2 | .pure-bd-left-3 | .pure-bd-left-4 | .pure-bd-left-5
4+
// .pure-bd-right-1 | .pure-bd-right-2 | .pure-bd-right-3 | .pure-bd-right-4 | .pure-bd-right-5
5+
// .pure-bd-top-1 | .pure-bd-top-2 | .pure-bd-top-3 | .pure-bd-top-4 | .pure-bd-top-5
26
@for $i from 1 through 5 {
37
.pure-bd-#{$i} {
48
border-width: #{$i}px;
59
border-style: solid;
610
}
11+
12+
.pure-bd-bottom-#{$i} {
13+
border-bottom-width: #{$i}px;
14+
border-bottom-style: solid;
15+
}
16+
17+
.pure-bd-left-#{$i} {
18+
border-left-width: #{$i}px;
19+
border-left-style: solid;
20+
}
21+
22+
.pure-bd-right-#{$i} {
23+
border-right-width: #{$i}px;
24+
border-right-style: solid;
25+
}
26+
27+
.pure-bd-top-#{$i} {
28+
border-top-width: #{$i}px;
29+
border-top-style: solid;
30+
}
731
}
832

933
// .pure-bd-black | .pure-bd-blue | .pure-bd-cyan | .pure-bd-green | .pure-bd-grey

0 commit comments

Comments
 (0)