mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add sticky utility
This commit is contained in:
parent
c94b62a505
commit
8537ceb7ce
@ -2192,6 +2192,10 @@ button,
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.pin-t {
|
||||
top: 0;
|
||||
}
|
||||
@ -5152,6 +5156,10 @@ button,
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sm\:sticky {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.sm\:pin-t {
|
||||
top: 0;
|
||||
}
|
||||
@ -8113,6 +8121,10 @@ button,
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.md\:sticky {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.md\:pin-t {
|
||||
top: 0;
|
||||
}
|
||||
@ -11074,6 +11086,10 @@ button,
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.lg\:sticky {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.lg\:pin-t {
|
||||
top: 0;
|
||||
}
|
||||
@ -14035,6 +14051,10 @@ button,
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.xl\:sticky {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.xl\:pin-t {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
@ -46,6 +46,11 @@ title: "Positioning"
|
||||
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">position: relative;</td>
|
||||
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Position an element according to the normal flow of the document.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.sticky</td>
|
||||
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">position: sticky;</td>
|
||||
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Position an element relative to the browser window when it's about to leave the viewport.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark">.pin-t</td>
|
||||
<td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark">top: 0;</td>
|
||||
|
||||
@ -6,6 +6,7 @@ export default function() {
|
||||
fixed: { position: 'fixed' },
|
||||
absolute: { position: 'absolute' },
|
||||
relative: { position: 'relative' },
|
||||
sticky: { position: 'sticky' },
|
||||
'pin-t': { top: 0 },
|
||||
'pin-r': { right: 0 },
|
||||
'pin-b': { bottom: 0 },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user