mirror of
https://github.com/picocss/pico.git
synced 2025-04-25 18:56:15 -04:00
enhanced the tooltip to have a width of max-content
and a max width of 250px. This will allow for the tooltips to not always be 250px wide even when the tooltip is short.
Added the ghost buttons from discussion #29
This commit is contained in:
parent
f8fbce367b
commit
eb1304a8e4
262 changed files with 2039 additions and 646 deletions
|
@ -177,6 +177,7 @@ $modules: map.merge(
|
|||
"components/nav": true,
|
||||
"components/progress": true,
|
||||
"components/tab": true,
|
||||
|
||||
// [role=tablist]
|
||||
// I wish role="tablist|tab|tabpanel" could be used on <details> and <summary> tag.
|
||||
"components/tab-region": false,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
width: max-content;
|
||||
max-width: 250px;
|
||||
padding: 0.25rem 0.5rem;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -206,4 +206,39 @@
|
|||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
// Ghost buttons
|
||||
// See: https://github.com/Yohn/PicoCSS/discussions/29
|
||||
@if $enable-classes {
|
||||
$btn-elements: 'button, [type="button"], [type="submit"], [type="reset"], [role="button"]';
|
||||
$btn-is: ':hover, :focus, :active, [aria-current]:not([aria-current="false"])';
|
||||
/* Base ghost button style */
|
||||
#{$parent-selector} :is(#{$btn-elements}).ghost {
|
||||
#{$css-var-prefix}background-color: transparent;
|
||||
#{$css-var-prefix}border-color: transparent;
|
||||
#{$css-var-prefix}color: var(#{$css-var-prefix}primary);
|
||||
|
||||
&:is(#{$btn-is}) {
|
||||
#{$css-var-prefix}background-color: transparent;
|
||||
#{$css-var-prefix}border-color: transparent;
|
||||
#{$css-var-prefix}color: var(#{$css-var-prefix}primary-hover);
|
||||
}
|
||||
}
|
||||
|
||||
/* Secondary ghost button */
|
||||
#{$parent-selector} :is(#{$btn-elements}).ghost.secondary {
|
||||
#{$css-var-prefix}color: var(#{$css-var-prefix}secondary);
|
||||
&:is(#{$btn-is}) {
|
||||
#{$css-var-prefix}color: var(#{$css-var-prefix}secondary-hover);
|
||||
}
|
||||
}
|
||||
|
||||
/* Contrast ghost button */
|
||||
#{$parent-selector} :is(#{$btn-elements}).ghost.contrast {
|
||||
#{$css-var-prefix}color: var(#{$css-var-prefix}contrast);
|
||||
&:is(#{$btn-is}) {
|
||||
#{$css-var-prefix}color: var(#{$css-var-prefix}contrast-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*!
|
||||
* Pico CSS ✨ v2.2.3 (https://github.com/Yohn/PicoCSS)
|
||||
* Pico CSS ✨ v2.2.4 (https://github.com/Yohn/PicoCSS)
|
||||
* Copyright 2019-2025 - Licensed under MIT
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue