Skip to content

Commit

Permalink
enhanced the tooltip to have a width of max-content and a max width…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
Yohn committed Jan 14, 2025
1 parent f8fbce3 commit eb1304a
Show file tree
Hide file tree
Showing 262 changed files with 2,039 additions and 646 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ There are 4 ways to get started with pico.css:
Alternatively, you can use [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@yohns/picocss) to link pico.css.

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].3/css/pico.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].4/css/pico.min.css" />
```

### Install with NPM
Expand Down Expand Up @@ -135,7 +135,7 @@ Use the default `.classless` version if you need centered viewports:
```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].3/css/pico.classless.min.css"
href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].4/css/pico.classless.min.css"
/>
```

Expand All @@ -144,7 +144,7 @@ Or use the `.fluid.classless` version if you need a fluid container:
```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].3/css/pico.fluid.classless.min.css"
href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].4/css/pico.fluid.classless.min.css"
/>
```

Expand All @@ -159,7 +159,7 @@ Then just write pure HTML, and it should look great:
<meta name="color-scheme" content="light dark" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].3/css/pico.classless.min.css"
href="https://cdn.jsdelivr.net/npm/@yohns/[email protected].4/css/pico.classless.min.css"
/>
<title>Hello, world!</title>
</head>
Expand Down
33 changes: 31 additions & 2 deletions css/pico.amber.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -1694,6 +1694,34 @@ button:focus, button:is([aria-current]:not([aria-current=false])):focus,
pointer-events: none;
}

/* Base ghost button style */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost {
--pico-background-color: transparent;
--pico-border-color: transparent;
--pico-color: var(--pico-primary);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-background-color: transparent;
--pico-border-color: transparent;
--pico-color: var(--pico-primary-hover);
}

/* Secondary ghost button */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.secondary {
--pico-color: var(--pico-secondary);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.secondary:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-color: var(--pico-secondary-hover);
}

/* Contrast ghost button */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.contrast {
--pico-color: var(--pico-contrast);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.contrast:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-color: var(--pico-contrast-hover);
}

/**
* Table
*/
Expand Down Expand Up @@ -4122,7 +4150,8 @@ progress::-moz-progress-bar {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.amber.min.css

Large diffs are not rendered by default.

33 changes: 31 additions & 2 deletions css/pico.azure.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -1694,6 +1694,34 @@ button:focus, button:is([aria-current]:not([aria-current=false])):focus,
pointer-events: none;
}

/* Base ghost button style */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost {
--pico-background-color: transparent;
--pico-border-color: transparent;
--pico-color: var(--pico-primary);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-background-color: transparent;
--pico-border-color: transparent;
--pico-color: var(--pico-primary-hover);
}

/* Secondary ghost button */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.secondary {
--pico-color: var(--pico-secondary);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.secondary:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-color: var(--pico-secondary-hover);
}

/* Contrast ghost button */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.contrast {
--pico-color: var(--pico-contrast);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.contrast:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-color: var(--pico-contrast-hover);
}

/**
* Table
*/
Expand Down Expand Up @@ -4122,7 +4150,8 @@ progress::-moz-progress-bar {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.azure.min.css

Large diffs are not rendered by default.

33 changes: 31 additions & 2 deletions css/pico.blue.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -1694,6 +1694,34 @@ button:focus, button:is([aria-current]:not([aria-current=false])):focus,
pointer-events: none;
}

/* Base ghost button style */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost {
--pico-background-color: transparent;
--pico-border-color: transparent;
--pico-color: var(--pico-primary);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-background-color: transparent;
--pico-border-color: transparent;
--pico-color: var(--pico-primary-hover);
}

/* Secondary ghost button */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.secondary {
--pico-color: var(--pico-secondary);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.secondary:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-color: var(--pico-secondary-hover);
}

/* Contrast ghost button */
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.contrast {
--pico-color: var(--pico-contrast);
}
:is(button, [type=button], [type=submit], [type=reset], [role=button]).ghost.contrast:is(:hover, :focus, :active, [aria-current]:not([aria-current=false])) {
--pico-color: var(--pico-contrast-hover);
}

/**
* Table
*/
Expand Down Expand Up @@ -4122,7 +4150,8 @@ progress::-moz-progress-bar {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.blue.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.amber.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ progress::-moz-progress-bar {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.amber.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.azure.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ progress::-moz-progress-bar {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.azure.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.blue.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ progress::-moz-progress-bar {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.blue.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.amber.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.amber.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.azure.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.azure.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.blue.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.blue.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.cyan.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.cyan.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.fuchsia.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.fuchsia.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.green.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.green.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.grey.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.grey.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions css/pico.classless.conditional.indigo.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* 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
*/
/**
Expand Down Expand Up @@ -3172,7 +3172,8 @@ body:has(dialog[open]) {
position: absolute;
bottom: 100%;
left: 50%;
width: 250px;
width: -moz-max-content;
width: max-content;
max-width: 250px;
padding: 0.25rem 0.5rem;
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions css/pico.classless.conditional.indigo.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit eb1304a

Please sign in to comment.