This repository was archived by the owner on Oct 4, 2026. It is now read-only.
Repository navigation
Replies: 1 comment
|
added to Roadmap of Blades CSS — a fully compatible and actively maintained successor to Pico CSS: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I would like to propose an Offcanvas component built on top of Pico's existing modal implementation.
Pico's modal uses the following semantic structure:
The proposed Offcanvas component preserves that structure while introducing an
element to identify the content as complementary and position it against the edge of the viewport:This allows the component to reuse the native behavior and accessibility features of
<dialog>, as well as much of Pico's existing modal styling, while presenting the content as a drawer rather than a centered overlay.<dialog>remains responsible for the overlay and native dialog behavior.<aside>establishes the content as complementary to the main page and acts as the positioning container.<article>retains Pico's existing card-like content structure and its support for optional headers and footers.Three new CSS rules would need to be introduced:
And any existing rule that uses
dialog > articlewould need to be updated to also includedialog > aside > article.Example:
Fiddle: https://jsfiddle.net/mk9tu1xL/
All reactions