Skip to content

Commit 1ce16e4

Browse files
author
Lachlan Campbell
committed
Tweak visual styles on position examples
1 parent be158db commit 1ce16e4

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

docs/layout/position/index.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,16 @@ <h3 class="f5 book pt4 caps">Position Relative</h3>
113113
</p>
114114
</div>
115115
<h3 class="f5 book pt4 caps">Position Relative + Absolute</h3>
116-
<div class="relative bg-black-10 h5 mbm">
117-
<div class="absolute top-1 left-1 right-2 bottom-2 white bg-dark-gray">
118-
<p class="measure pam">
119-
This is an absolutely positioned element set to have offsets of top and left to 1rem with right and bottom offset by 2rem. It's parent with the light gray background is set to position relative.
116+
<div class="relative bg-black-10 h5 mbm br2">
117+
<div class="absolute top-1 left-1 right-2 bottom-2 white bg-black-50 br2">
118+
<p class="measure lh-copy ph3">
119+
This is an absolutely positioned element set to have offsets of top and left to 1rem with right and bottom offset by 2rem. It's parent with the light gray background is set to position relative.
120120
</p>
121121
</div>
122122
</div>
123-
<div class="relative bg-black-10 h5 mbm">
124-
<div class="absolute top-0 right-0 white bg-dark-gray w2 pvs tc">
125-
X
126-
</div>
127-
<p class="measure pal">
123+
<div class="relative bg-black-10 h5 mbm br2">
124+
<span class="absolute top-0 right-0 ma2 white bg-black-50 pa2 tc br2">X</span>
125+
<p class="measure lh-copy pa3">
128126
This illustrates an absolutely positioned element that might always need to be in the top right of the content like a close button for a modal that needs to be dismissed.
129127
</p>
130128
</div>

src/templates/docs/position/index.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,16 @@ <h3 class="f5 book pt4 caps">Position Relative</h3>
7777
</p>
7878
</div>
7979
<h3 class="f5 book pt4 caps">Position Relative + Absolute</h3>
80-
<div class="relative bg-black-10 h5 mbm">
81-
<div class="absolute top-1 left-1 right-2 bottom-2 white bg-dark-gray">
82-
<p class="measure pam">
83-
This is an absolutely positioned element set to have offsets of top and left to 1rem with right and bottom offset by 2rem. It's parent with the light gray background is set to position relative.
80+
<div class="relative bg-black-10 h5 mbm br2">
81+
<div class="absolute top-1 left-1 right-2 bottom-2 white bg-black-50 br2">
82+
<p class="measure lh-copy ph3">
83+
This is an absolutely positioned element set to have offsets of top and left to 1rem with right and bottom offset by 2rem. It's parent with the light gray background is set to position relative.
8484
</p>
8585
</div>
8686
</div>
87-
<div class="relative bg-black-10 h5 mbm">
88-
<div class="absolute top-0 right-0 white bg-dark-gray w2 pvs tc">
89-
X
90-
</div>
91-
<p class="measure pal">
87+
<div class="relative bg-black-10 h5 mbm br2">
88+
<span class="absolute top-0 right-0 ma2 white bg-black-50 pa2 tc br2">X</span>
89+
<p class="measure lh-copy pa3">
9290
This illustrates an absolutely positioned element that might always need to be in the top right of the content like a close button for a modal that needs to be dismissed.
9391
</p>
9492
</div>

0 commit comments

Comments
 (0)