* adding link to Privacy Policy in sidebar.njk
* adding link to Refund Policy in sidebar.njk
* separating legal bits into a 'Terms & Policies' sidebar.njk section
* remove themer from sidebar
* fix themes/palettes spacing
* suppress error in layouts without <wa-page>
* remove broken themer link, add more helpful deets
* make my last commit actually work 🙄
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* initial take on text utility improvements
* re-introduce `.wa-caption-*`
* reorg stylesheet
* remove font weight classes
* gimme the font weights
* add `.wa-text-truncate`, `.wa-list-plain`
* add longform, color-text-link, and placeholder classes
* document utilities
* document missing font weight tokens
* use proper longform font weight
* find and replace outdated text utilities
* use new font size utilities
* missed a spot!
* add changelog
* adding bg-wa-pattern.svg asset
* adding background-wa-pattern to utils.css
* as a repeating background image
* defining customizable elements
* adding background-dot-grid to utils.css
* updating sidebar's version info
* removing beta badge
* updating tooltip + version number decorator for official launch
* removing beta notice from docs landing view
* removing beta from Installation docs
* Document code completion setup for Web Awesome
Added instructions for enabling code completion in VS Code and JetBrains IDEs for Web Awesome components.
This mirror what already exist for Shoelace: https://shoelace.style/getting-started/usage#code-completion
+ a new line to explain how to setup VS Code completion from the CDN
* Update packages/webawesome/docs/docs/usage.md
* Update packages/webawesome/docs/docs/usage.md
* Update packages/webawesome/docs/docs/usage.md
* Update packages/webawesome/docs/docs/usage.md
* Update packages/webawesome/docs/docs/usage.md
* Update packages/webawesome/docs/docs/usage.md
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* adding .appearance-plain for lists to utils.css
* adding gitLastModifiedISO filter to .eleventy.js
* adding link to Pro License in sidebar.njk
* adding link to Free License in sidebar.njk
* adding link to Terms of Service in sidebar.njk
* adding "last updated" date to changelog.md
* Make the README better
• Replace straight quotes with smart quotes
• Revise Node.js minimum requirement wording (to prevent line breaks)
• Replace old links to LitElement (Polymer) to Lit
• Replace mentions of “NPM” with “npm”, as per https://github.com/npm/cli?tab=readme-ov-file#is-it-npm-or-npm-or-npm
• Fix some grammar and abbreviations
• Made “dependencies” and “devDependencies” mentions unquoted to be consistent
• Correct “MIT license” with “MIT License”, as per https://opensource.org/license/mit
* Make some specific changes to make wording more clear
* add missing dot
* remove smart quotes
* updating Pro Badge's appearance
* abstracting Pro Badge into include
* adding nanoid-based uniqueId filter to eleventyConfig
* ensuring Pro Badge instances have unique ids
* using added uniqueId filter + nanoid
* converting Pro Badge to be macro-based
* customizing Pro Badge's associated wa-tooltip size
* syncing up `<body>` classes on blank.njk
* using `wa_page_attributes` block instead of `pageType`
* using `head` block instead of `pageType`
* removing `pageType` from `<body>` classes
* removing `pageType` from eleventyConfig
* updating color-scheme-selector's icons
* allowing `wa-page` attributes to override those set in base.njk
* allowing pageClass to be used on base.njk's `<body>`
* import relevant utilities into native styles
* import color variant classes into free palettes
* import the default palette into kitchen sink, not the default theme
* fix palette path
* import each theme's intended palette
* started horizontal card logic
* a little more work
* remove SSR attributes
These are no longer used since we're not serving up an SSR version of the website anymore.
* more work
* looking for old code
* added actions slot to horizontal card
* troubleshooting linter issue
* fixed liniting error
* responded to feedback
* added jsDoc and updated example
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* adding conditional header + footer includes to `base.njk`
- support for custom headers via `header` front matter variable
- support for custom footers via `footer` front matter variable
- backward compatibility with default header
* revising `base.njk`'s body classes
* adding fileSlug-based class to body
* adding pageType-based class (default `docs`) to body
* adding conditional CSS asset logic to `base.njk`
* to load marketing-based CSS based on pageType
* to load docs-based CSS by default
* disabling wa-page's sticky header for marketing pageType
* using layout utilities for sidebar heading link styling
* syncing up sidebar heading + general link styles
* updating sidebar heading text + icon alignment
* updating layout of experimental + pro badge decoratives
* increasing visual padding of `#search-trigger`'s `<kbd>`
* fixing `<li>` indentations
* Add FA 7 support
* Add FA 7 support
* Add FA 7 support
* Update the system library to use FA 7 icons
* fix: fix type issues
* Update the SVGs in the system library to be minified/compressed
* add suggestions and more features
* feat: add `swap-opacity` attribute
* fix: remove unrelated stuff in `swap-opacity` attribute styling
* Only scale paths for fixed width icons
* fix: fix Prettier lint issues
* fix: fix more syntax errors
* lint: Fix CSS linting, batch 1 of 3
* lint: fix TS linting issues, batch 2 of 3
* lint: Fix JS linting issues, batch 3 of 3
* lint: fix hopefully last linting issue, batch 3.5 of 3
* lint: fix final linting issues, 3.75 of 3
* lint: the actual last lint fix, batch 3.875 of 3
* chore: centre SVG paths within the SVG for fixed‐width icons
* fix iconoir example
* add comment to clarify
* use a constant for fa version
* remove unsupported features
* update for FA7; improve duotone support
* update changelog
* remove redundant fixed-width attributes
* update kit code
* notdog!
* add support for pro+ icons
* clean up example layouts, use consistent icon sizes
---------
Co-authored-by: randomguy-2650 <150704902+randomguy-2650@users.noreply.github.com>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* Adjust label styles for button and checkbox components to not crush space of nested tags
* Adjust label styles for button and checkbox components to not crush space of nested tags
* Update packages/webawesome/src/components/checkbox/checkbox.css
---------
Co-authored-by: Tobias Bannwart <tobias.bannwart@bison-group.com>
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* add before / after watch events so pro can properly incrementally build
* add events for pro / app
* add extra hooks for non-wa dev
* add old new line
* use package-lock.json from next
* npm install
* prettier
* change to webawesome
* change to webawesome
* update index.md
* whitespace
* add thanks for being a webawesome pro subscriber
* add stub for currentUser
* add source code link
* add source code link
* prettier
* fix raw call
* add pro badge to themer
* add isPro flag to palettes
* show based on currentUser.hasPro
* fix logged out user stuff
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* progress, components A – C
* left behind tweaks for A – C
* all the rest
* tweaks
* remove 'accent + outlined' appearances and other tweaks
* fix overlooked docs + scouts rule
* re-add `--checked-icon-color` to radio and checkbox
* revert to `--thumb-size`
* fix theme overrides
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* consolidate theme files
* move dimension to its own layer
* touch up
* fix `.wa-invert`
* fix selectors and missing fonts
* fix selectors (for real this time)
* add button for drawer example
* scaffolding
* building initial page
* loading blank
* committing to pull down changes
* committing to merge
* trying to sync with next
* drawer issue
* added content to drawer
* added checkout page
* added checkout page
* committing to merge
* committing to merge
* made changes to sidebar
* syncing with repo
* syncing with repo
* update sidebar again
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* use wa-popup in color picker
* remove test
* remove old dropdown, menu, menu item, menu label
* remove old dropdown
* rework dropdown + dropdown item
* update examples
* add hide duration
* update jsdoc
* add event
* add size
* add size
* fix docs
* remove old test; fix types
* add submenu to example
* adapt for <wa-popup>
* remove state
* fix dropdown stuff (#1044)
* fix dropdown stuff
* prettier
* get typescript to give a real error
* remove unnecessary checks
* prettier
* remove old tag
* convert old dropdowns to new syntax
* update example
* update styles
---------
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* tidy and touch up content styles
* finish touching up inline text styles
* move styles for docs code blocks from `native.css` to appropriate files
* tidy and touch up list and table styles
* tidy and touch up details styles
* tidy up dialog styles
* fix bloated spacing in dialog and drawer
* add fieldset, refactor radio and checkbox styles
* refactor input, textarea, and select styles
* refactor range styles to match new `<wa-slider>`
* readability improvements
* touch up theme overrides
* fix Matter checkbox and radio hover styles
* visual test setup
* fix improper class placement in visual tests
* add `wa-form-control-*-font-size` and `-wa-form-control-hint-*` custom properties
* use new custom properties
* dump of component sizing improvements
* fix native color picker styles
* update menu with relative sizes
* tidy up menu, select, and tag sizing
* use relative sizing across components
* touch up custom properties
* update docs and comments
* update changelog
* revert changes to visual tests to simplify PR
* revert leftover change to visual tests
* tidy up space doc markdown
* fix default card spacing
* fix card docs
* wrap up new `--tag-max-size` for `<wa-select>`
* change default `--tag-max-size`
* prettier
* touch up
* clean up leftovers
* fix native form control margins
* set default toggle size relative to font size
* correct toggle size in docs
* Konnorrogers/lm form control sizing (#1025)
* try a second updateComplete??
* try a second updateComplete??
* more timeouts?
* try logging
* more logging
gp
* maybe now
* radio group test
* add todo note'
* add workflow dispatch for client tests
---------
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
* remove redundant styles from template
* rotate arrow based on placement so borders show correctly when applied
* use actual placement, not preferred
* add popover
* update changelog
* update changelog
* use <dialog> for popover
* fix arrow border in FF/Safari
* update content
* add sidebar to plop
* add popover
* remove test value
* remove animation to prevent page-to-page blips
* static sidebar
* manage open sections on page load and with turbo
* cleanup unused scripts
* Remove overlap between Style Utilities and Layout
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* vertical => orientation="vertical"; fixes#674
* add issue
* Update divider styles and docs to use `orientation='vertical'`
* Update split panel styles and docs to use `orientation='vertical'`
* Update remaining docs and patterns examples to `orientation='vertical'`
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* Exclude Create link from sidebar, for reals this time
* Fix bug
* Very rough prototype of look & feel
* a11y
* Clean up data files
* Automatically generate theme metadata
* Read look & feel params straight from theme
* First stab at dimensionality icons
* Fix rounding 0 bug
* Add border width slider
* [Image-comparer] Expose wrapper as part
* [Comparer] `pointer-events: none` while dragging
* Dark mode slider
* Adjust increments and ranges for look + feel sliders
* Fix preview
* Fix bug where dark mode was not inverted
* Ability to select panel from URL
* Create mixin for Vue form controls and use it in `<swatch-select>`
* Prototype of slider min/max icon buttons
* Nx tooltip
* Icons
* Prevent failed request
* info-tip: Support passing text as prop
* Clearable
* [Brutalist] Match `--wa-shadow-offset-x-scale` to `--wa-shadow-offset-y-scale`
* Add 'Blocky' dimension (derived from Awesome theme)
* Only show Reset button when `clearable` is set
* Remove `clearable` from Look & Feel sliders
* Add tooltips to min/max buttons
* Remove superfluous `aria-label`
* Do not assume that all hyphens in URLs mean nesting, make it explicit
* Formatting
* Fix bug where styles were not applied on page load
* Update Subtle dimension to maximize compatibility
* `<wa-scoped>`: Do not allow non-template children
* Workaround for card not updating
* Update Glossy dimension to maximize compatibility
* Sync scrolling between regular and inverted preview
* Fix bug
* Make changing the base theme reset customizations
* Fix palette page
* Remove cancel button from editable text
* Don't error in theme pages
* Update Playful dimension to maximize compatibility
* Rename 'Look and Feel' to 'Elements' for better parallel structure
* Hide dimensionality controls
* Make back icon motion more subtle
* Expand spacing slider bounds
* Add `tabindex="-1"` where missing in theme showcase
* Remove extraneous gap from theme headers
* fix edit button bug
* rename comparer => comparison; fix aria-controls
* Always save theme name on blur
* Add changelog for themer and new patterns category
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* initial commit to this pr
* updated patterns
* category lists
* post headers
* WIP
* made some content updates
* deleted rogue file
* updated descriptions
* ran prettier
* updated padding
* updated prettierignore
* updated element
* swtiched to token
* updated with category list feedback
* updated with category list feedback
* updated with feedback for featurd post
* updated with feedback for footer
* updated with newsletter feedback'
* updated with feedback to the paywall
* updated with updates for post footer
* more footer updates
* updated with feedback for the post header
* updated with feedback for post list
* updated social share
* updated sign up and login
* added logic to elements to prevent them from closing on escape
* Fix typo (incomplete `<h2>` tag)
* Add missing input labels, fix capitalization and punctuation
* Add description to Blog & News index
* ran prettier on markdown files
* ignored the post list file
* changed hierarchy
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* [Menu-item] Drop `base` wrapper (rel #207)
Also add two states: `has-submenu` and `submenu-expanded`
* Add `checked-icon` and `submenu-icon` slots
* [Menu-label] Drop `base` part
* update changelog
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* Basic scaffolding
* Generate theme & palette data.js that other JS can import
* Make it possible to include page-card without links
* WIP
* Add `appearance` to details, closes#569
Except `accent` as that's a) far less useful and b) trickier due to the icon color
* Fix broken link
* WIP
* WIP
* Icons icon
* Unify styles for interactive cards
* Prevent focusing inside theme icons
* Fixes
* Action page cards
* Panel scrollables
* scrollable
* Scroll shadows
* Add renaming UI
* UI
* Move styling of heading icons to `ui.css`
* Support permalinks & CRUD
* Make clickable cards more accessible
* Style cards a little better
* Default to styles panel if theme is selected
* Update theme-icons.css
* Custom themes should be saved under Custom
* Get theme code
* Bigger title
* Fixes
* Use theme Vue app for remixing too
* Fix preview jank and make preview script more flexible
* Make radio groups scrollable
* Add affordance to button cards
* Sticky
* `<color-select>`
* Fix theme remixing
* Improve previewing logic
* Fix preview
* Move `domChange()` to separate module
`theme-picker.js` includes side-effects, which may not always be desirable everywhere we may want to import `domChange()`
* Update preview.js
* Panel animation
* Hide Save button if no changes and not saved
* Do not show blank code when no selection has been made
* Use theme slug in filename
* Remove unused component
* Better UI for editing title (and any other text)
* Tweak UI of renaming
* Better indicate default selection
* Fix preview reverting bug
* Fill out app preview with more examples
* Remove `zoom` from theme showcase (yields unexpected/painful results Safari), improve display in wider viewports
* Pending delete
* Make styles panel cards scrollable
* Fix some of the Safari issues
* Update search.css
* Update panel.css
* Select preview UI
* Fix typo
* Frame colors setting as color contrast
* Show dark mode in color mappings
* Brand color
* Swatch styling
* Fix caret icon
* Move Starting theme to the same level as other controls
* Rename typography to Fonts
* Fix bug: Swatch select should show swatches from the selected palette
* Move capitalize to shared utils
* Add utils for handling nested objects
* Icons panel
* Update code.js
* Move utils around
* Add fit and finish to sidebar panels
* Theme card: Move icons to separate data structure
* Move data to dedicated folder since we now have a lot more of it
* Add default icon families and variants to themes
* Data
* Add `deepEntries()`
* Add Duotone
* Spruce up icons preview
* Use theme's icon family in showcase
* Font cards
* Font cards
* Add `max-inline-size` to preview container
* Remove alternate preview options
* Remove theme subtitle
* Support FA kit codes
* Remove Pro badges from theme cards
* Use panagram preview for Fonts
* Consistent heading and label capitalization
* Classes for different icons-card types
* Update data.js.njk
* Variable style on icon family cards
* Fix Sharp Duotone
* Clean up FA kit code hint
* Hide non-functional Icon Library field
* Fix theme icon heights
* icon variant -> style in theme metadata
* Fix bug with icons defaults not being shown
* More convenient theme defaults
* Fix bug with non updating URL
* Fix bug
* Fix multiplying badges
* Custom docs pages
* Add Duotone icons to Mellow theme
* Fix 404
* Remove "Create" from sidebar
* Fix bug
* Move vue components to `/assets/`, move their CSS with them
* Safari/FF compatibility
* Make panels scrollable again
* Fix extra spacing
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* Reduce build process noise
- Only run 11ty when something has changed within `docs/`
- Only run esbuild if a JS file has changed within
* Update scripts/build.js
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
- Add `:where([class^='wa-theme-'], [class*=' wa-theme-'])` to default `typography.css` since we declare mappings that need to be inherited by other themes.
- Remove declarations that redeclare defaults
- Ensure consistent order
- [Awesome] Switch code font to ui-monospace
Fixes several issues for components using the `display: contents` technique:
- Introduce `--display` CSS property to make it possible to override internal display value of base part.
- Ensure `display: contents` is always applied with `!important` to avoid rendering glitches like the one here
- Ensure non-inherited custom properties are also inherited
- Ensure the `hidden` attribute still works.
* dividing up e-commerce patterns
* started invoice table
* building out the filter
* Initial Commit
* switching machines
* switching machines
* started split image pattern:
* commiting to merge in next
* commiting to switch machines
* upated the product detail patterns
* updated product list patterns
* updated some patterns
* filter work
* added utilities to order history
* added utilities to order-summary
* updated width of container
* switching machines
* switching machines
* fixing conflicts
* editing descriptions
* updated descriptions
* adding some polish
* more filter work
* updated prouct preview
* Revisions to "Product Features"
* "Category Filters" revisions + `wa-placeholder` utility
* cleaned up product list
* tweaked product overview
* tweaked order history
* tweak category preview
* "Checkout Form" revisions
* Re-add `navigation` to "Product Features" carousel
* cleaned up shopping cart
* tweaked order summary
* Add missing file extension
* Fix typo in file name
* Revert checkout form changes in attempt to improve diff
* Reimplement checkout form revisions
* cleaned up checkout form
* Add "What's a Pattern?" and "Using Patterns" to index
* Update category descriptions and headings
* Add docs layout for patterns with stylesheet
* tweaked customer review
* Add checkout form example
* a little more polish
* more tweaks
* switching branches to merge
* created e-commerce index
* unlisted links
* updtated content
* updated content for category preview
* updated order history
* committing to bring branches up to next
* inital commit
* Reorganize app patterns into separate pages
* switching machines
* Add link style utilities
* Refactor product list patterns
* more polish
* Refactor product overview patterns
* switching machines
* Refactor shopping cart patterns
* committing to pull down changes
* updated product preview
* updated image
* updated incentives
* Clean up utility usage and code formatting for category previews
* started updating with style utilities
* Clean up utilities and formatting, replace placeholder text in order history
* updated incentive images
* updated reviews
* added review variant
* more polish
* some heavy duty updates
* removed store navigation
* switching machines
:
* Clean up utility usage and code formatting for order summaries
* Clean up utility usage and code formatting for product previews
* big switchover
* removed old file
* working on sidebar
* updated sidebar
* created info category
* splitting up the old blog page
* a little cleanup and adding detail
* got three done
* updated social share
* Quick formatting adjustment
* initial paywalls
* Use overviews in pattern subcategories (#826)
* Do not error if no pages
* Automatically set parents and tags for patterns
* Update overview.njk
* [WIP] Use overview pages for pattern listings
* Remove explicit parents
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* some newsletter signups
* added login patterns
* reworked feeds'
* a few more
* added a few more
* add more app patterns
* App pattern tweaks (#827)
* Fix `patterns.css` reference
* Tweaks to action panel patterns
* Tweaks to comments patterns
* Progress on data display patterns
* Progress on empty state patterns
* Use email-related data from recent update in `pattern-main` (altered slightly)
* Tweaks to data display patterns
* Tweaks to empty state patterns
* Tweaks to FAQ patterns
* Tweaks to feed patterns
* Tweaks to grid patterns
* Tweaks to pagination patterns
* Tweaks to pricing patterns
* Tweaks to description list patterns
* Tweaks to leaderboard patterns
* Add and update names and descriptions
* Ensure comments fields have labels
* Tweak recent additions
* switching machines
* catching up with next
* added permissions pattern
* switching machines
* added post articles
* having local browset issues
* a few more app patterns
* took out info patterns
* spiffed up the action panels
* gave the action panels a once over
* added content to data display
* updated a few patterns
* clean up a few e-commerce patterns
* added time componen to reviews
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
Co-authored-by: Lea Verou <lea@verou.me>
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
* First stab at using the Popover API for PE
* fix popup
* First stab at using the Popover API for PE
* fix popup
* Prettier
* Fix TS error
* Remove workaround
* Default to `strategy = fixed` if Popover API is not supported
* Clear out default UA styles for popovers
* Kill `hoist` with fire 🔥
* Refactor
* Update `@floating-ui/dom`
* Fix flipping and shofting
* Fix autosize
* Use `defaultBoundary` for `flip` too
That way we get the previous behavior for it.
* Remove `strategy`, just use `SUPPORTS_POPOVER` check where relevant
* Remove uses of `strategy`
* Use viewport as the default boundary for shifting and autosizing and add `boundary=scroll` to override
---------
Co-authored-by: konnorrogers <konnor5456@gmail.com>
* Generalize CRUD logic to more easily support themes (and other types of entities)
* Decouple data structures managing saved entities (palettes, themes), sidebar update logic, and palette app (and soon themer) by using events
* Simplify logic (a lot of it carried complexity back from the time we did not use uids and/or was overly general)
* `PersistedArray` class to encapsulate arrays persisted in localStorage
* Remove unused `palette.equals()` function
- Moved fixes to bug fixes section
- Linked `allDefined()` and `.wa-cloak` to their docs
- Grouped related bugfixes together
- Moved docs bugfixes to the end (since they are of least interest to users)
* Fix: Parent URL should be undefined if parent is falsy
* Document `docs.11tydata.js` better
* Move `docs/installation.md` to `docs/`, fixes#585
* Just in case
* Make sure components that only appear within page icons are still detected
* Palette icons
* Update theme-icons.css
* Reduce whitespace between swatches
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
* revert structure and styles to fix WA-A #123
* fix WA-A #201
* update changelog
* fix search dialog position so it doesn't jump around
* remove close watcher; fix dialog/drawer backdrop animations
Instead of raw DSD, use a component that pulls in a child template and then goes over the CSS and extracts font-related rules into the document, just once per rule.
This also fixes theme icons in Vue.
* Fix outline for headings that have links
Previously produced blank items because it assumed any link in a heading is an anchor
* Filter unlisted items from overviews
Previously they were filtered only when the card was rendered, so their heading was still shown
* [Overview] Add id to group headings
* Hide headings from empty groups
Should never happen but you never know
* [Overview] Ensure "Other" is always last even when no sorting
- Sidebar, overview listings, breadcrumbs now based on actual parent-child relationships, rather than increasingly outdated heuristics
- parent properties are now generated automatically from the URL structure, and need only be specified to override that default
- Ability to group by page hierarchy in overview pages, where pages that have >= 2 children become categories
Smaller improvements:
- More flexible syntax for specifying the params of overview pages
- [Overviews] Hide group heading if only one group is present
- parentItem and parentUrl properties that can be used on any page
- Alias a collection as the children of a page (useful for "virtual" parents like Layout)
- Do not error if a page card icon is missing
* Initial comment, based on #768
* Add `neutral` color variables
* Add `success`, `warning`, and `danger` variables
* Theme touch-ups
* Remove unused clamped tokens
* Re-add clamped tokens test page, refactor to be based on hue instead of `brand`
- Add ids, use ids to link copy button. No need for client-side script or updating the copy button manually for dynamic code snippets.
- Add button to link to code block
- Slight refactor on copy plugin to use the 11ty API properly
- General infrastructure to support palette tweaking
- Hue shifts per color scale (UI, permalinks, dynamic code snippets)
- Scale overall chroma up/down (UI, permalinks, dynamic code snippets)
- Update contrast ratio tables (styling for contrast up/down/fail could use improvement, but it's a starting point)
- Make sure it works with Turbo (i.e. things don't break when we navigate to another page)
- Drop `base` part (rel #207)
- Add `hint` slot and attribute (it was the only form control that did not support that)
- Refactor `@watch` calls to `updated()` per @claviska's plan for them
* Add `label` attribute and `defaultLabel` getter to option and menu-item, drop `getTextLabel()`
- Add `label` attribute to option and menu-item, closes#698
- [Option] Add `defaultLabel` cached property to both
- [Option] Remove `getTextLabel()` method from both (people can just set `el.label`)
- Refactor: Merge utils to get text content into one more powerful utility function
- Fixed typo in `slot.ts`
.
Add `label` attribute to menu, remove `getTextLabel`
* Update filename
* Initial progress on visual test suite
* Additional tests and descriptions
* Add native callout, add dividers between tables
* Indicate test failures, improve alignment tests
* Split tests into separate files
* Add table scrolling
* Remove irrelevant icon test cases
* Add test failures
* Shorten "Inline Code" > "Code" to prevent wrapping
* Add horizontal orientation to radio button tests
* add orientation to radio group; fixes#613
* fix timing issue that prevents value from being set sometimes
* gimme a break
* make radio button examples horizontal
---------
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
- Add `default` descriptor
- Do not reflect attributes when equal to their default value
- Patch getter return value to return default value when empty
- Use it in button `appearance`
- Added `part="control", fixes#529
- Removed wrapper div which is no longer needed
- Removed `form-control--has-hint` class which is no longer used anywhere
* Initial glassy theme progress
* Add fallback to slider thumb box shadow
* Remove redundant `wa-dark` styles and refactor shadows
* Rename to 'Glossy' since it fits the vibe better
- Minimize needless swaps
- Centralize logic
- Use an actual `<wa-select>` rather than hacking it with `<wa-dropdown>`
- Move shared includes to shared template
- Rewrite critical theme JS
- Refactor of theme picker code
- Utilize view transitions better and use them for color scheme too
- Do not store default value in localStorage
- Removed unused `*-wide` templates
- Fixed#482
* Presentation improvements
* Change `-webkit-text-size-adjust` to supported value (`none` isn't a supported keyword on iOS)
* Try using `text-size-adjust`
* Throwing caution to the wind
* Give up on `text-size-adjust` and add 1-column view
* tweaked the tag component
* updated based on feedback
* updated to remove span
* changed display to initial
* prettier
---------
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
* skip broken test
* add middleware to follow new stylesheet imports
* fix avatar tests
* update badge tests
* fix button tests
* skip carousel test
* fix checkbox tests
* fix details test
* update radio button tests
* fix input tests
* fix progress bar tests
* update
* fix range tests
* fix select tests
* restore wrapper div to pass a11y tests
* fix switch tests
* fix tag tests
* fix textarea tests
* fix tooltip tests
* skips
* fix tree item tests
* [DRAFT]: test fixes (#421)
* working on some stuff..
* add a small delay for menu-item
* prettier
* add a small delay for menu-item
* prettier
* add a small delay for menu-item
* add a small delay for menu-item
* add a small delay for menu-item
* prettier
* Empty commit
* add a small delay for menu-item
* always build with alpha
* always build with alpha
* move to alpha builds
---------
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
- Use hueless color tokens so it can be used with variants (and add example)
- Fix hover effect on zebra rows
- Reduce padding a bit
- Shorten utility class
- CSS nesting
- Simplify styles and DOM
- Add `.wa-text-field` utility class
- Eliminate `--border-color` (except when set by appearance utils), `--border-style`, `--border-radius`
Revert "Replace font-size variable with `1em`"
This reverts commit 1ac70f31abe2bab310bbfbdbb3aa5d4498c5648d.
Replace font-size vars with 1em when calculating form control height
As discussed with @lindsaym-fa last week. Hopefully this will eventually help reduce duplication across themes.
Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
As discussed with @lindsaym-fa
Still unsure about some of these (especially about whether blockquote & details should be separate) but I figured better go ahead and split and we can fine tune later
Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
- Removed BEM-style naming (the shadow DOM gives you scoping already!)
- Use new size helper
- Organize styles to keep an element’s styles together, using nesting for modifiers
- Removed unused classes
Turns out `prettier-plugin-organize-imports` sorts imports differently than the old one so this will prevent spreading the change across multiple commits whenever we touch a file (and potentially introducing conflicts)
- Reduce class names by using `:has()`, native pseudo-classes, or `[part~=foo]` selectors
- Remove `hasFocus` property since it’s no longer needed
- Move the icon hiding logic to CSS
Shared styles are now added in the base class, rather than having to be repeated in every component.
In the odd case a component does not want the shared styles, it can define a custom `styles` property of its own.
Rn this means we don't get expand animations at all but that’s fine. I think it's fine to have an animation on close and not on open (different user goals — you open to get to the info, you close to get it out of the way, the opening is more urgent)
* initial progress
* spruce up docs sample page
* clean up and organization
* revert extraneous addition to applied.css
* accidentally reverted the wrong change 😅
* take 2 - revert extraneous addition in applied.css
* more cleanup
* Simplify how list of components is exposed to 11ty
No need for functions or computing multiple times, that's what data is for!
* Add attributes to component data
* Cleanup
* Add slug (tagName without wa-)
* Add component reference / cheatsheet
* initial progress
* testing progress
* play with naming, utility classes
* more tweaking and testing
* progress on 12 column grid
* add layout index, start documenting
* documentation progress
* cleanup and doc progress
* more doc progress
* more progress
* final progress hurdle and cleanup
* refining and editing
* remove sandbox
* refactor extra utility classes
* layout index improvements
* change gap modifiers to utility classes
* change align modifiers to utility classes
* move layout examples above fold
* reduce demo markup
* use standard aspect ratio property for wa-frame
* change border-radius modifier to utility class
* rename wa-grid's 'min-inline-size' to 'min-column-size'
* clean up comments
* rename wa-align-* to wa-align-items-*
* break out style utilities from layout
* clean up
* continued ssr work
* continued ssr work
* prettier
* all components now rendering
* everything finally works
* fix type issues
* working on breadcrumb
* working on breadcrumb
* radio group
* convert all tests to ssr
* prettier
* test suite finally passing
* add layout stuff
* add changelog
* fix TS issue
* fix tests
* fixing deploy stuff
* get QR code displaying
* fix tests
* fix tests
* prettier
* condense hydration stuff
* prettier
* comment out range test
* fixing issues
* use base fixtures
* fixing examples
* dont vendor
* fix import of hydration support
* adding notes
* add notesg
* add ssr loader
* fix build
* prettier
* add notes
* add notes
* prettier
* fixing bundled stuff
* remove cdn
* remove cdn
* prettier
* fiixng tests
* prettier
* split jobs??
* prettier
* fix build stuff
* add reset mouse and await aTimeout
* prettier
* fix improper tests
* prettier
* bail on first
* fix linting
* only test form with client
* redundancy on ssr-loader??
* maybe this will work
* prettier
* try callout now
* fix form.test.ts
* fix form.test.ts
* prettier
* fix forms
* fix forms
* try again
* prettier
* add some awaits
* prettier
* comment out broken SSR tests
* prettier
* comment out broken SSR tests
* prettier
* dont skip in CI
* upgrade playwright to beta
* prettier
* try some trickery
* try some trickery
* await updateComplete
* try to fix form.test.ts
* import hydrateable elements 1 time
* prettier
* fix input defaultValue issues
* fix form controls to behave like their native counterpartS
* add changelog entry
* prettier
* fix unexpected behavior with range / button
* add test for min / maxlength
* prettier
* fix accessibility issue in tab group
* add changelog entry
gp
* fix swatches for things that dont have background colors
* first pass at starlight
* converting to starlight
* working on converting to starlight
* working on data
* watch custom-elements.json
* turn on pagefind
* add component meta data
* fix renderings / overrides.
* fix mdx logo
* continue starlight work
* building site
* get global styles + reloads working
* themer fixes
* adding additional headings
* working on dynamic content
* have TableOfContents.astro push to TOC
* working on code stuff
* remove code preview
* deploy
* add patch package
* patch in build
* patch in build
* remove {% raw %} calls
* convert to starlight...complete
* prettier
* update lockfile
* merge main
* fix index.mdx
* prettier'
* fix small things
* docs updates
* add dark mode shortcut
* prettier
* prettier
* prettier
* remove pagefind from public
* add twitteR
* prettier
* fix tests
* prettier
* remove square, stretch, and squish spacing tokens
* remove units from base tokens
* rename corner tokens with t-shirt size scale
* rename 'font-size' tokens to 'size'
* rename 'neutral' primitives to 'base'
* remove black and white tokens
* improve 'form-controls' tokens
* reintroduce granular focus ring tokens
* fix themer styles
* tweak shadow styles
* improve naming and scope of foundational colors
* overhaul color naming and add new themes
* more classic sl component styles
* make 'chic' theme dark by default
* adjust table row colors
* remove deprecated properties from 'classic' theme
* remove mistakenly committed stylesheets
* revert adjustment to space properties
* delete web-types.json
* revert "rename 'font-size' tokens to 'size'"
* Move custom properties related to shadows and borders to separate stylesheets
* Change base values and themer calculations related to shadows and borders to be unitless
* Add low-level custom properties for alert, button, card, input, select, switch, and textarea
* Add generic guidance for authoring custom properties to the Contributing docs
* [RFC] Proof-of-concept commit for submenu support
This is a Request For Comments to seek directional guidance towards
implementing the submenu slot of menu-item.
Includes:
- SubmenuController to manage event listeners on menu-item.
- Example usage in menu-item documentation.
- Trivial tests to check rendering.
Outstanding questions include:
- Accessibility concerns. E.g. where to handle 'ArrowRight',
'ArrowLeft'?
- Should selection of menu-item denoting submenu be possible or
customizable?
- How to parameterize contained popup?
- Implementation concerns:
- Use of ref / id
- delegation of some rendering to the controller
- What to test
Related to [#620](https://github.com/shoelace-style/shoelace/issues/620).
* Update submenu-controller.ts
Removed extraneous `console.log()`.
* PoC working of ArrowRight to focus on submenu.
* Revert "PoC working of ArrowRight to focus on submenu."
(Didn't mean to publish this.)
This reverts commit be04e9a221.
* [WIP] Submenu WIP continues.
- Submenus now close on change-of-focus, not a timeout.
- Keyboard navigation support added.
- Skidding fix for better alignment.
- Submenu documentation moved to Menu page.
- Tests for accessibility, right and left arrow keys.
* Cleanup: Removed dead code and dead code comments.
* style: Eslint warnings and errors fixed. npm run verify now passes.
* fix: 2 changes to menu / submenu on-click behavior:
1. Close submenu on click explicitly, so this occurs even if the menu is
not inside of an sl-dropdown.
2. In menu, ignore clicks that do not explicitly target a menu-item.
Clicks that were on (e.g. a menu-border) were emitting select events.
* fix: Prevent menu's extraneous Enter / space key propagation.
Menu's handleKeyDown calls item.click (to emit the selection).
Propagating the keyboard event on Enter / space would the cause re-entry
into a submenu, so prevent the needless propagation.
* Submenu tweaks ...
- 100 ms delay when opening submenus on mouseover
- Shadows added
- Distance added to popup to have submenus overlap menu slightly.
* polish up submenu stuff
* stay highlighted when submenu is open
* update changelog
* resolve feedback
---------
Co-authored-by: Bryce Moore <bryce.moore@gmail.com>
* Never select tree items when clicking the chevron
This changes the behaviour of sl-tree so that clicking on the expand/collapse icon will not select/deselect the item, only toggle it's expanded state.
* Refactor: inline SlTree.syncTreeItems
This was only called from 2 places, and they each had different
behaviour anyways.
* SlTree: separate expand/collapse from selection
This makes 'multi' and 'single' mode consistent with each other, and
with native file managers.
* feat(clipboard): add new component sl-clipboard
* using slots
* using a single copyStatus
* feat(clipboard): support inputs/textarea/links and shadow dom
* fix(clipboard): add area-live to announce copied
* feat(clipboard): support any component with a value property
* initial attempt at not auto defining
* add files with -
* continued work on removing auto-define
* fix component definitions
* update with new tag stuff
* fix lots of things
* fix improper scoped elements
* working through side effects
* continued react wrapper work
* update changelog
* formatting
* fixes
* update changelog
* lint / formatting
* fix version injection
* fix version injection, work on test
* fix version injection, work on test
* fix merge conflicts
* fix jsdoc null issue
* fix templates
* use exports
* working on tests
* working on registration mocking
* fix customElements test
* linting
* fix some test stuff
* clean up test
* clean up comment
* rename scopedElements to dependencies
* linting / formatting
* linting / formatting
* mark all packages external and still bundle
* set bundle false
* set bundle true
* dont minify
* fix merge conflicts
* use built shoelace-element
* fix lint errors
* prettier
* appease eslint
* appease eslint gods
* appease eslint gods
* appease eslint gods
* appease eslint gods
* add shoelace-autoloader
* move it all into 1 function
* add exportmaps note
* prettier
* add jsdelivr entrypoint
* read as utf8
* update docs with .component.js importS
* prettier
* Move keydown handler for sl-drawer back to base div
This restores the stacking behaviour of drawers
See: #1457
* Autofocus panel of sl-drawer when it is open on firstUpdate
* Rename SlSlideChange for consistency with other events
* Setup React event types for events used by Shoelace components
Means that consumers of Shoelace via the React wrapper will be able to
use callback methods with the correct event type, instead of having to
rely on casting and friends when using Typescript.
* Add docs demonstrating importing event types for React callbacks
* add modal tab tracking
* prettier
* sort by tabindex
* sort by tabindex
* add a dialog test case for shadow roots
* add a changelog note
* add a changelog note
* prettier + test fixes
* prettier + test fixes
* Add tests for qr-code
* Fix a small bug in qr-code
The background color was not passed to the
qr code
---------
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
The current statement is incorrect and will result in
`Module not found: Package path ./dist/shoelace is not exported from package /your/path/to/node_modules/@shoelace-style/shoelace (see exports field in /your/path/to/node_modules/@shoelace-style/shoelace/package.json)`
* Added tests for sl-split-panel
test for horizontal arrangement
* Added tests for sl-split-panel
tests for vertical arrangement
---------
Co-authored-by: stefanie.hellgartner <stefanie.hellgartner@in-tech.com>
* add regression test for checkbox focusing
* change number of checkboxes / switches
* change max-height to 400px so it fails
* re-add positon: relative;
* Improve performance of sl-icon by caching later
* Fixed error handling
* Don't use requestInclude in sl-icon
* Separate sl-icon errors into cacheable and retryable errors
* Fix acessability issue
* Additionally adapted the test
* Added more accessability tests
* Updated the testing documentation
to take the fact that accessability checks cover only
rendered content into account
---------
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
Did not manage to check
that the properties are correctly passed
to the animation api at this point so this
stays a blackbox test
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
The reason for the problems is that the error event does
not escape from the shadow dom.
Thus it cannot be awaited for in the test
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
* fix(carousel): don't resume autoplay if interacting
* fix(carousel): wrap pagination items
* chore(carousel): add unit tests
* feat(carousel): more reactive pagination dots
* fix(carousel): trigger scrollend when user scroll exactly over a snap point
* Resize observer sometimes throws errors which
are nothing to worry about, see also the corresponding
comment on tab-group.test.ts
* Unfortunately, the web testing library installs an
error event handler which takes precedence before the
event handlers installed in the tests
(see node_modules/@web/browser-logs/dist/logUncaughtErrors.js)
* the only possibility to avoid these null logs is to install
an error event handler at an even earlier place
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
* Improved tests for SlAlert
* added more test for coverage
* Grouped tests in multiple subgroups
* remove executing only one tests
* Fix the now executing tests
---------
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
* #1163 - added read-only properties 'validity' and 'validationMessage' to all nine form controls
* #1163 - added base support for showing form validation messages below the form controls
* #1163 - animated validation errors in demo
* #1181 - Removed all previous changes that have been validation error specific
* Started with 'Inline validation' demo / fixed merge issues / etc.
* #1181 - continued work on missing form validation features
* #1181 - enhanced validation support for SlColorPicker / some cleanup
* #1181 - fixed CSS issues
* #1181 - fixed again CSS issues
* '1181 - added form validation features finally working
* #1181 - bug fixes
* #1181 - fixed open issues / added API doc comments
* #1181 - updated inline validation demos / removed some legacy code
* #1181 - finished invalid form validation example
* #1181 - added tests / several bugfixes
* #1181 - fixed typos etc.
* #1181 - tests
* #1181 - tests
* #1181 - tests
* dropdown filtered menu items
* updated filter, added test
- updated filter to match menu getAllItems private method
- added test
---------
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* remove duplicate test
* Add tests for sl-tab-group -- initial round of tests
* use individual fixtures for each test
* extract mocks + utility functions in external files
* remove unnecessary internals of intersection observer from the mock
* added first test on scroll buttons
* add scrolling tests
* remove resize observer mock
Resize observer is triggered but waiting for element
to be updated is not enough. You need to free the main thread
with the test for some time
* Also removed intersection observer mock
By waiting long enough for the things to happen automatically
* Fix problems with resize observer
These problems appeared after npm ci but (according
to the sources linked in the comments) unproblematic
* Handle merge request comments
* replace custom wait function with corresponding function
from openwc/testing
* Extracted waitForScrollingToEnd and isElementVisibleFromScrolling into
dedicated files to be reused
* Improve queryByTestId --> make it usable for more complex values
* Add js docs
* run lint fix
* Added tests for selecting a tab by click
* added further tests for tab group selection
* use Promise<void> instead of Promise<any>
to avoid eslint errors
---------
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
* Initial example of a JSON schema and converter for design tokens
* Clean up script and relocate file
* Update token JSON format and finish build process
* removed checked and indeterminate parts from doc
* Revert "removed checked and indeterminate parts from doc"
This reverts commit 5e702387e1ace4e5d6b424f861df8e6a3a1a4fdd.
* control--checked & control--indeterminate parts
* sl-color-picker use lib '@ctrl/tinycolor' instead of 'color'
typescript, esm and smaller
* parseColor adjustments
removed normalizeColorString and other tweaks
* added hsv format
* fixed const
* Fix mapping in exports
Fixes#1019
- Add correct mapping for public entrypoints.
* Remove shoelace.js from from exports list
Should still works fine while importing this way: import { thing } from '@shoelace-style/shoelace';
* added stepUp and stepDown to sl-range
* step function & default props tests for sl-range
* stepUp, stepDown & showPicker functions for input
* step functions & default props tests for sl-input
* made name and placeholder default to empty string
* updated changelog
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
add check to input component if japanese character is chosen by pressing enter key and prevent form submitting
Co-authored-by: VitaliyMaznyi <vitalii.maznyi@fasterthanlight.me>
* Added tests for sl-relative-time
* Solves a blinker which appears only when I run
the full test suite: Chromium and webkit are fine
but sometimes there is this one error on firefox
for the disabled test of the menu item (saying there
was a timeout waiting). Did not happen again after
doing the change.
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
* move component description from docs to component
* use component description in docs
* add style for lead sentence, keep bc for not updated components
* run `npm prettier`
* render summary as part of the header
* add `title` as another custom tag for JSDoc
* render components title in header
* provide possibility to render components "description" into docs with `[component-description:COMPONENT_NAME]`
* the meta summary should be rendered into header too
* Avoid bubbling events for sl-include
I ran into an issue where icons inside of an HTML include were dispatching `sl-load` events, which was causing my `sl-include` event handler to run multiple times. By adding these guards, we ensure only events immediately dispatched by the element itself will be handled.
* Use the correct event variable
The description for the checkbox's value attribute is currently "the checkbox's value attribute." I think we can do better than that, especially considering anyone who hasn't worked with old-school HTML forms that POST to the URL in the `action` attribute is unlikely to know why a checkbox has a value and that value is not boolean.
While I was here I improved a couple of other descriptions. If there's an interest, I can expand this PR to update all of the properties in all controls where the description is tautological.
* Tooltip: Recalculate target after slotchange
The tooltip's positioning breaks after a slotchange, unless the tooltips target is recalculated.
* Update src/components/tooltip/tooltip.test.ts
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
* initial button tests and setup helpers
* fix as many linting errors as I could
* switch back to regular fixtures
* test(button|button-group|divider|format-bytes) add tests for more components
* add tests for format util components
* finish format-number tests
* remove unnecessary ignore
* Create integrating-with-laravel.md
Instructions for using Shoelace components in a Laravel 8.x application.
* Update integrating-with-laravel.md
Added a section for setting the base path and switched to using the full import path for each component. Also included a full `bootstrap.js` example.
* test: migrate skipped tests to the breadcrumb-item
* test: when rendering a HTMLAnchorElement
* test: add checks for classes.
* test: uplift langauge and query selector to test label part
* test: default button test
* refactor: set default for rel on prop declaration.
* test: introduce first pass test for components/avatar
feat: set alt="" on img element
* test: resolve img src 404 errors
* test: remove bad test
* test: test children by assigning nodes...
* test: add patches similar to badge patch
* style: address typing issues.
The sl-input's value state being `undefined` is very common when using shoelace with frameworks. Instead of erroring out and not showing the input, this should handle it gracefully.
* Add prefix and suffix slot to sl-select component
* Adding align-items: center in prefix/suffix and changing documentation to showcase using as visual aids
* automate github release creation
Adds a workflow file to create a GitHub release, when a version tag is pushed.
* set fix latest version of auto release action
The path to assets should be consistent and not depend on the current script source. There are at least two situations when this assumption fails:
- When running `webpacker-dev-server`, the _pack_ URL doesn't contain `/js/` part.
- In test environment, `/packs-test` is used by default.
Thanks for this great library @claviska!
Tried adding Shoelace to a Rails app w/ the current guide. When starting the Webpack Dev Server, the following error gets thrown:
```
.../RailsApplication/config/webpack/development.js:5
module.exports = environment.toWebpackConfig()
```
Adding `module.exports = environment` as done [here in the example repo](4114da0e14/config/webpack/environment.js (L20)) fixes the issue and allows Webpack to compile.
@@ -35,7 +35,7 @@ This Code of Conduct applies within all project spaces, and it also applies when
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at cory@abeautifulsite.net. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@fontawesome.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
about: Create a bug report to help us fix a demonstrable problem with code in the library.
title: ''
labels: bug
assignees: claviska
assignees:
---
**Describe the bug**
A clear and concise description of what the bug is.
### Describe the bug
A bug is _a demonstrable problem_ caused by code in the library. Please provide a clear and concise description of what the bug is here.
**To Reproduce**
### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
2. Click on '...'
3. Scroll down to '...'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
### Demo
**Screenshots**
If applicable, add screenshots to help explain your problem.
If the bug isn't obvious, please provide a link to a CodePen or Fiddle with a minimal reproduction. Bugs that have repros get attention faster than those that don't.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Tip: use the CodePen button on any example in the docs!
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
### Screenshots
If applicable, add screenshots to help explain the bug.
**Additional context**
Add any other context about the problem here.
### Browser / OS
- OS: [e.g. Mac, Windows]
- Browser: [e.g. Chrome, Firefox, Safari]
- Browser version: [e.g. 22]
### Additional information
Provide any additional information about the bug here.
# # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name:Client Tests
on:
workflow_dispatch:
push:
branches:[next]
pull_request:
branches:[next]
jobs:
client_test:
runs-on:ubuntu-latest
strategy:
matrix:
node-version:[20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name:SSR Tests
on:
# push:
# branches: [next]
workflow_dispatch:
jobs:
ssr_test:
runs-on:ubuntu-latest
strategy:
matrix:
node-version:[20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
- Added `name` and `invalid` prop to `sl-color-picker`
- Added support for form submission and validation to `sl-color-picker`
- Added touch support to demo resizers in the docs
- Fixed a bug where swapping an animated element wouldn't restart the animation in `sl-animation`
- Fixed a bug where the cursor was incorrect when `sl-select` was disabled
- Fixed a bug where `slBlur` and `slFocus` were emitted twice in `sl-select`
- Fixed a bug where clicking on `sl-menu` wouldn't focus it
- Fixed a bug in the popover utility where `onAfterShow` would fire too soon
- Fixed a bug where `bottom` and `right` placements didn't render properly in `sl-tab-group`
- Improved keyboard logic in `sl-dropdown`, `sl-menu`, and `sl-select`
- Updated `sl-animation` to stable
- Updated to Stencil 2.0 (you may need to purge `node_modules` and run `npm install` after pulling)
- Updated entry points in `package.json` to reflect new filenames generated by Stencil 2
## 2.0.0-beta.17
- Added `minlength` and `spellcheck` attributes to `sl-textarea`
- Fixed a bug where clicking a tag in `sl-select` wouldn't toggle the menu
- Fixed a bug where options where `sl-select` options weren't always visible or scrollable
- Fixed a bug where setting `null` on `sl-input`, `sl-textarea`, or `sl-select` would throw an error
- Fixed a bug where `role` was on the wrong element and aria attribute weren't explicit in `sl-checkbox`, `sl-switch`, and `sl-radio`
- Fixed a bug where dynamically adding/removing a slot wouldn't work as expected in `sl-card`, `sl-dialog`, and `sl-drawer`
- Fixed a bug where the value wasn't updated and events weren't emitted when using `setRangeText` in `sl-input` and `sl-textarea`
- Optimized `hasSlot` utility by using a simpler selector
- Updated `bootstrap-icons` to 1.0.0 with many icons redrawn and improved
- Updated contribution guidelines
**Form validation has been reworked and is much more powerful now!**
- The `invalid` prop now reflects the control's validity as determined by the browser's constraint validation API
- Added `required` to `sl-checkbox`, `sl-select`, and `sl-switch`
- Added `reportValidity()` and `setCustomValidity()` methods to all form controls
- Added validation checking for custom and native form controls to `sl-form`
- Added `novalidate` prop to `sl-form` to disable validation
- Removed the `valid` prop from all form controls
- Removed valid and invalid design tokens and related styles (you can use your own custom styles to achieve this)
## 2.0.0-beta.16
- Add `hoist` prop to `sl-color-picker`, `sl-dropdown`, and `sl-select` to work around panel clipping
- Add `sl-format-bytes` utility component
- Add `clearable` and `required` props to `sl-select`
- Add `slClear` event to `sl-input`
- Added keyboard support to the preview resizer in the docs
- Fixed a bug where the `aria-selected` state was incorrect in `sl-menu-item`
- Fixed a bug where custom properties applied to `sl-tooltip` didn't affect show/hide transitions
- Fixed a bug where `--sl-input-color-*` custom properties had no affect on `sl-input` and `sl-textarea`
- Refactored `sl-dropdown` and `sl-tooltip` to use positioner elements so panels/tooltips can be customized easier
## 2.0.0-beta.15
- Added `image-comparer` component
- Added `--width`, `--height`, and `--thumb-size` custom props to `sl-switch`
- Fixed an `aria-labelledby` attribute typo in a number of components
- Fixed a bug where the `change` event wasn't updating the value in `sl-input`
- Fixed a bug where `sl-color-picker` had the wrong border color in the dark theme
- Fixed a bug where `sl-menu-item` had the wrong color in dark mode when disabled
- Fixed a bug where WebKit's autocomplete styles made inputs looks broken
- Fixed a bug where aria labels were wrong in `sl-select`
- Fixed a bug where clicking the label wouldn't focus the control in `sl-select`
## 2.0.0-beta.14
- Added dark theme
- Added `--sl-panel-background-color` and `--sl-panel-border-color` tokens
- Added `--tabs-border-color` custom property to `sl-tab-group`
- Added `--track-color` custom property to `sl-range`
- Added `tag` part to `sl-select`
- Updated `package.json` so custom elements imports can be consumed from the root
- Fixed a bug where scrolling dialogs didn't resize properly in Safari
- Fixed a bug where `slShow` and `slHide` would be emitted twice in some components
- Fixed a bug where `custom-elements/index.d.ts` was broken due to an unclosed comment (fixed in Stencil 1.17.3)
- Fixed bug where inputs were not using border radius tokens
- Fixed a bug where the text color was being erroneously set in `sl-progress-ring`
- Fixed a bug where `sl-progress-bar` used the wrong part name internally for `indicator`
- Removed background color from `sl-menu`
- Updated to Stencil 1.17.3
## 2.0.0-beta.13
- Added `slActivate` and `slDeactivate` events to `sl-menu-item`
- Added experimental `sl-animation` component
- Added shields to documentation
- Fixed a bug where link buttons would have `type="button"`
- Fixed a bug where button groups with tooltips experienced an odd spacing issue in Safari
- Fixed a bug where scrolling in dropdowns/selects didn't work properly on Windows (special thanks to [Trendy](http://github.com/trendy) for helping troubleshoot!)
- Fixed a bug where selecting a menu item in a dropdown would cause Safari to scroll
- Fixed a bug where type to select wouldn't accept symbols
- Moved scrolling logic from `sl-menu` to `sl-dropdown`
## 2.0.0-beta.12
- Added support for `href`, `target`, and `download` to buttons
- Fixed a bug where buttons would have horizontal spacing in Safari
- Fixed a bug that caused an import resolution error when using Shoelace in a Stencil app
## 2.0.0-beta.11
- Added button group component
- Fixed icon button alignment
- Fixed a bug where focus visible observer wasn't removed from `sl-details`
- Replaced the deprecated `componentDidUnload` lifecycle method with `disconnectedCallback` to prevent issues with frameworks
## 2.0.0-beta.10
- Added community page to the docs
- Fixed a bug where many components would erroneously receive an `id` when using the custom elements bundle
- Fixed a bug where tab groups weren't scrollable with the mouse
## 2.0.0-beta.9
- Added the icon button component
- Added the skeleton component
- Added the `typeToSelect` method to menu so type-to-select behavior can be controlled externally
- Added the `pulse` prop to badge
- Fixed a bug where hovering over select showed the wrong cursor
- Fixed a bug where tabbing into a select control would highlight the label
- Fixed a bug where tabbing out of a select control wouldn't close it
- Fixed a bug where closing dropdowns wouldn't give focus back to the trigger
- Fixed a bug where type-to-select wasn't working after the first letter
- Fixed a bug where clicking on menu items and dividers would steal focus from the menu
- Fix a bug where the color picker wouldn't parse uppercase values
- Removed `noFooter` prop from dialog and drawer (slot detection is automatic, so the prop is not required)
- Removed `close-icon` slot from alert
- Replaced make-shift icon buttons with `sl-icon-button` in alert, dialog, drawer, and tag
- Updated Stencil to 1.17.1
- Switched to jsDelivr for better CDN performance
## 2.0.0-beta.8
- Added the card component
- Added `--focus-ring` custom property to tab
- Fixed a bug where range tooltips didn't appear on iOS
- Fixed constructor bindings so they don't break the custom elements bundle
- Fixed tag color contrast to be AA compliant
- Fixed a bug that made it difficult to vertically align rating
- Fixed a bug where dropdowns would always close on mousedown when inside a shadow root
- Made tag text colors AA compliant
- Promoted badge to stable
- Refactored `:host` variables and moved non-display props to base elements
- Refactored event handler bindings to occur in `connectedCallback` instead of the constructor
- Refactored scroll locking logic to use `Set` instead of an array
- Updated the custom elements bundle documentation and added bundler examples
- Upgraded Stencil to 1.17.0-0 (next) to fix custom elements bundle
## 2.0.0-beta.7
- Added links to version 1 resources to the docs
- Added rating component
- Fixed a bug where some build files were missing
- Fixed clearable tags demo
- Fixed touch icon size in docs
## 2.0.0-beta.6
- Enabled the `dist-custom-elements-bundle` output target
- Fixed a bug where nested form controls were ignored in `<sl-form>`
## 2.0.0-beta.5
- Fixed bug where `npm install` would fail due to postinstall script
- Removed unused dependency
## 2.0.0-beta.4
- Added `pill` variation to badges
- Fixed a bug where all badges had `pointer-events: none`
- Fixed `@since` props to show 2.0 instead of 1.0
- Fixed giant cursors in inputs in Safari
- Fixed color picker input width in Safari
- Fixed initial transitions for drawer, dialog, and popover consumers
- Fixed a bug where dialog, dropdown, and drawer would sometimes not transition in on the first open
Shoelace is an open source project, meaning everyone can use it and contribute to its development. When you join our community, you'll find a friendly group of enthusiasts at all experience levels who are willing to chat about anything and everything related to Shoelace.
Before contributing, please review the contributions guidelines at:
The easiest way to get started contributing is to join the [community chat](https://discord.gg/mg8f26C). This is where we hang out, discuss new ideas, ask for feedback, and more!
A common misconception about contributing to an open source project is that you need to know how to code. This simply isn't true. In fact, there are _many_ ways to contribute, and some of the most important contributions come from those who never write a single line of code. Here's a list of ways you can make a meaningful contribution to the project:
- Submitting well-written bug reports
- Submitting feature requests that are within the scope of the project
- Improving the documentation
- Responding to users that need help in the community chat
- Triaging issues on GitHub
- Being a developer advocate for the project
- Sponsoring the project financially
- Writing tests
- And, of course, contributing code!
Please take a moment to review these guidelines to make the contribution process as easy as possible for both yourself and the project's maintainers.
## Using the Issue Tracker
The [issue tracker](https://github.com/shoelace-style/shoelace/issues) is for bug reports, feature requests, and pull requests.
- Please **do not** use the issue tracker for personal support requests. Please [join the community chat](https://discord.gg/mg8f26C) or [ask your question](https://stackoverflow.com/questions/ask) on StackOverflow instead.
- Please **do not** derail, hijack, or troll issues. Keep the discussion on topic and be respectful of others.
- Please **do not** post comments with "+1" or "👍". Use [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) instead.
- Please **do** use the issue tracker for feature requests, bug reports, and pull requests.
Issues that do not follow these guidelines are subject to closure. There simply aren't enough resources for the author and contributors to troubleshoot personal support requests.
### Feature Requests
Feature requests can be added using the issue tracker.
- Please **do** search for an existing request before suggesting a new feature.
- Please **do** use the "👍" reaction to vote for a feature.
- Please **do** share substantial use cases and perspective that support new features if they haven't already been mentioned.
- Please **do not** bump, spam, or ping contributors to prioritize your own feature.
If you would like your feature prioritized, please consider [sponsoring the project](https://github.com/sponsors/claviska).
### Bug Reports
A bug is _a demonstrable problem_ caused by code in the library. Bug reports are an important contribution to the quality of the project. When submitting a bug report, there are a few steps you can take to make sure your issues gets attention quickly.
- Please **do not** paste in large blocks of irrelevant code
- Please **do** search for an existing issue before creating a new one
- Please **do** explain the bug clearly
- Please **do** provide a minimal test case that demonstrates the bug (e.g. [jsfiddle.net](https://jsfiddle.net/) or [CodePen](https://codepen.io/))
- Please **do** provide additional information, when necessary, to replicate the bug
**A minimal test case is critical to a successful bug report.** It demonstrates that the bug exists in the library and not in surrounding code. Contributors should be able to understand the bug without studying your code, otherwise they'll probably move on to another bug.
If you would like your bug prioritized, please consider [sponsoring the project](https://github.com/sponsors/claviska).
### Pull Requests
To keep the project on track, please consider the following guidelines before submitting a PR.
- Please **do not** submit a PR without opening an issue first, especially for non-trivial changes. This may prevent you from doing work that won't be accepted for various reasons (e.g. someone is already working on it, it's not a good fit for the project, it needs additional planning, etc.)
- Please **do** make sure your PR clearly defines what you're changing. Even if you feel your changes are obvious, please explain them so other contributors can more easily review your works. PRs without detailed descriptions are subject to closure pending more details.
- Please **do not** edit anything in `dist/`. These files are generated automatically, so you need to edit the source files instead.
The author reserves the right to reject any PR that's outside the scope of the project or doesn't meet code quality standards.
### Branches
`current` - This branch reflects the latest release and powers [shoelace.style](https://shoelace.style/).
`next` - This branch is where pull requests will land. It reflects what's coming in the _next_ release, which can be previewed at [next.shoelace.style](https://next.shoelace.style/).
## Conventions
This section aims to describe some of the design decisions and code conventions that support the project. All contributors are expected to follow conventions and best practices, even those not explicitly defined in this document. When in doubt, refer to existing source code and execute your best judgment.
In order to keep the project in a maintainable state, code that doesn't follow conventions and best practices will need to be refactored before it will be accepted. This isn't a knock on your code or your style — it's something the author considers necessary to operate a successful open source project.
### Semantic Versioning
Shoelace follows [Semantic Versioning](https://semver.org/). Breaking changes in components with the "Stable" badge will not be accepted until the next major version. As such, all contributions must consider the project's roadmap and take this into consideration. Features that are deemed no longer necessary will be deprecated but not removed.
Components with the "Experimental" badge should not be used in production. They are made available as release candidates for development and testing purposes. As such, changes to experimental components will not be subject to semantic versioning.
### Code Formatting & Linting
The majority of code formatting is handled automatically by [Prettier](https://prettier.io/) at build time. However, for the best experience, you should [install it in your editor](https://prettier.io/docs/en/editors.html) and enable format on save.
Linting is run automatically at build time. By design, the project will not build if the linter is unhappy. Contributors are strongly encouraged to install an ESLint plugin for your editor for the best developer experience.
### BEM Class Names
All components use a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM), so styles are completely encapsulated from the rest of the document. As a result, class names _inside_ a component won't conflict with class names _outside_ the component, so we're free to name them whatever we want.
Internally, each component uses the [BEM methodology](http://getbem.com/) for its class names. There is no technical requirement to do this — it's purely the preference of the author. However, all contributions are expected to follow this practice for the sake of consistency.
## Developer Tips
### Documentation is the key to success
Nobody likes writing documentation, but not having good docs is frustrating to users and makes the project less appealing. Fortunately, writing documentation for Shoelace is really easy!
A lot of the documentation is generated automatically based on JSDoc comments in each component's source code. If you have ESLint enabled, your editor will tell you when a comment is missing. This may feel a bit naggy, but it's a very good thing. Every property, method, event, etc. is documented this way. By adding comments as you code, the docs are more easily kept up to date.
The documentation pages are served up by [Docsify](https://docsify.now.sh/). Check out `docs/_sidebar.md` and `docs/components/` to get an idea of how pages are created and formatted. If you're creating a new component, it may help to use an existing component's markdown file as a template.
If you need help with documentation, feel free to reach out!
### Choose composability when possible
When designed right, web components are highly composable, meaning you can easily reuse them in other components. This reduces the overall size of the library, expedites feature development, and maintains a consistent user experience throughout.
The select component, for example, makes use of the dropdown, input, and menu components. Because it's offloading most of its functionality and styles to these lower-level components, the select component remains very lightweight and its appearance and behavior is consistent with other form controls and menus.
### When to use a standard property vs. a CSS custom property
When designing a component's API, standard properties ("props") are generally used to change the _behavior_ of a component, whereas CSS custom properties ("CSS variables") are used to change the _appearance_ of a component. Remember that props can't respond to media queries, but CSS variables can.
There are some exceptions to this (e.g. when it significantly improves developer experience), but a good rule of thumbs is "will this need to change based on screen size?" If so, you probably want to use a CSS variable.
### When to use a CSS custom property vs. a CSS part
There are two ways to enable customizations for components. One way is with CSS custom properties ("CSS variables"), the other is with CSS parts ("parts").
CSS variables are scoped to the host element and can be reused throughout the component. A good example of a CSS variable would be `--border-width`, which might get reused throughout a component to ensure borders share the same width for all internal elements.
Parts let you target a specific element inside the component's shadow DOM but, by design, you can't target a part's children or siblings. You can _only_ customize the part itself. Use a part when you need to allow a single element inside the component to accept styles.
This convention can be relaxed when the developer experience is greatly improved by not following these suggestions.
### Boolean Props
Boolean props should _always_ default to `false`, otherwise there's no way for the user to unset it without JavaScript. To keep the API as friendly and consistent as possible, use a name like `noHeader` with a default value of `false` instead of `header` with a default value of `true`.
### A Note About Sass
The Shoelace _source_ is developed using Sass for the convenience of nested selectors, imports, and tedious things such as color palette generation. By design, Sass variables, color functions, and other preprocessor-specific feaures are not used in the source and will not be accepted in a PR.
Consumers of the library should never need to worry about preprocessing the library.
### Positioning Popovers
Shoelace uses an internal popover utility for dropdowns, tooltips, etc. This is a light abstraction of Popper.js designed to make positioning and transitioning things easy and consistent throughout the library. When possible, use this utility instead of relying on Popper directly. See `src/utilities/popover.ts` for details.
### Host and Base Elements
All components have a host element, which is a reference to the actual `<sl-*>` elements. Make sure to always set the host element's `display` property to the appropriate value depending on your needs, as the default is `inline` per the HTML spec.
```css
:host{
display:inline-block;
}
```
Aside from `display`, avoid setting properties on the host element when possible. The reason for this is that styles applied to the host element are not encapsulated. Instead, create a base element that wraps the internals and style that instead. This convention also makes it easier to use BEM in components.
```css
.sl-example{
/* This is the base element */
}
.sl-example--primary{
/* Primary modifier */
}
```
To expose custom properties for a component, define them in the `:host` block and use the following syntax for comments so they appear in the generated docs.
```css
/**
* @param --color: The component's text color.
* @param --background-color: The component's background color.
*/
:host{
--color:white;
--background-color:tomato;
display:inline-block;
}
```
### Conditional Slots
When a component relies on the presence of a slot to do something, don't assume the initial state of the component is its permanent state. Users can add and remove slotted content anytime, and components should be aware of this.
- Create an `updateSlots` method that uses `hasSlot` (imported from `src/utilities/slot.ts`) to check for the required slot(s)
- Listen on the host element for the `slotchange` event and run `updateSlots`
- Don't conditionally render any slots — always use `hidden` or `display: none` so the slot exists in the DOM
See the source of card, dialog, or drawer for examples.
### Form Controls
Form controls should support validation through the following conventions:
- All form controls must an `invalid` prop that reflects its validity
- All form controls must have a `setCustomValidity()` method so the user can set a custom validation message
- All form controls must have a `reportValidity()` method that reports its validity during form submission
- All form controls should mirror their native validation attributes such as `required`, `pattern`, `minlength`, `maxlength`, etc. when possible
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Shoemakers, or "developers," can use this documentation to learn how to build Shoelace from source.
Developers can use this documentation to learn how to build Web Awesome from source. You will need Node.js 14.17 or later to build and run the project locally.
**You don't need to do any of this to use Shoelace!** This page is for people who want to contribute to the project, tinker with the source, or create a custom build of Shoelace.
**You don't need to do any of this to use Web Awesome!** This page is for people who want to contribute to the project, tinker with the source, or create a custom build of Web Awesome.
If that's not what you're trying to do, the [documentation website](https://shoelace.style) is where you want to be.
If that's not what you're trying to do, the [documentation website](https://webawesome.com) is where you want to be.
### What are you using to build Shoelace?
### What are you using to build Web Awesome?
Components are built with [Stencil](https://stenciljs.com/), a compiler that generates standards-based web components. The source code is a combination of TypeScript + JSX (TSX). Stylesheets are written in SCSS.
Components are built with [Lit](https://lit.dev/), a custom elements base class that provides an intuitive API and reactive data binding. The build is a custom script with bundling powered by [esbuild](https://esbuild.github.io/).
The build is done through a combination of Stencil's CLI and a handful of custom scripts.
### Understanding the Web Awesome monorepo
Web Awesome uses [npm workspaces](https://docs.npmjs.com/cli/v11/using-npm/workspaces) for its monorepo structure and is fairly minimal in what it provides.
By using npm workspaces and a monorepo structure, we can get consistent builds, shared configurations, and reduced duplication across repositories which reduces regressions and forces consistency across `webawesome`, `webawesome-pro`, and `webawesome-app`.
Generally, if you plan to only work with the free version of `webawesome` it is easiest to go to `packages/webawesome` and run all commands from there.
### Where do npm dependencies go?
Any dependencies intended to be used across all packages (i.e., `prettier`, `eslint`) that are **not** used at runtime should be in the root `devDependencies` of `package.json`.
```bash
npm install -D -w prettier
```
Any dependencies that will be used at runtime by a package should be part of the specific package's `dependencies` such as `lit`. This is required because if that dependency is not in the `packages/*/package.json`, it will not be installed when used via npm.
Individual packages are also free to install `devDependencies` as needed as long as they are specific to that package only.
To install a package specific to a Web Awesome package, change your working directory to that package's root (i.e., `cd packages/webawesome && npm install <package-name>`).
### Forking the Repo
Start by [forking the repo](https://github.com/shoelace-style/shoelace/fork) on GitHub, then clone it locally and install dependencies.
Start by [forking the repo](https://github.com/shoelace-style/webawesome/fork) on GitHub, then clone it locally and install dependencies.
Once you've cloned the repo, run the following command.
Once you've cloned the repo, run the following command from the respective directory within `packages/*`.
```bash
npm run start
cd packages/webawesome
npm start
```
This will spin up the Shoelace dev server. Note that the dev server requires ports 4000, 4001, and 4002 to be available.
After the initial build, a browser will open at `http://localhost:4000`.
Hot module reloading (HMR) is enabled for components, so changes will instantly reflect in the browser as you work. The documentation is powered by Docsify, which uses raw markdown files to generate pages. As such, no static files are built for the docs. Unfortunately, changes to _documentation pages_ will trigger a page refresh (no HMR).
This will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browsers don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically.
### Building
To generate a production build, run the following command.
```bash
cd packages/webawesome
npm run build
```
You can also run `npm run build:serve` to start an [`http-server`](https://www.npmjs.com/package/http-server) instance on `http://localhost:4000` after the build completes, so you can preview the production build.
### Creating New Components
To scaffold a new component, run the following command, replacing `wa-tag-name` with the desired tag name.
```bash
cd packages/webawesome
npm run create wa-tag-name
```
This will generate a source file, a stylesheet, and a docs page for you. When you start the dev server, you'll find the new component in the "Components" section of the sidebar.
### Adding additional packages
Right now the only additional packages are in private repositories.
To add additional packages from other repositories, run `git clone <url> packages/<package-name>` to clone your repo into `packages/`.
Make sure to run `npm install` at the root of the monorepo after adding your package!
### Contributing
Shoelace is an open source project and contributions are encouraged! If you're interesting in contributing, please review the [contribution guidelines](CONTRIBUTING.md) first.
Web Awesome is an open source project and contributions are encouraged! If you're interesting in contributing, please review the [contribution guidelines](CONTRIBUTING.md) first.
## License
Shoelace is designed in New Hampshire by [Cory LaViska](https://twitter.com/claviska). It’s available under the terms of the MIT license.
Designing, developing, and supporting this library requires a lot of time, effort, and skill. I’d like to keep it open source so everyone can use it, but that doesn’t provide me with any income.
**Therefore, if you’re using my software to make a profit,** I respectfully ask that you help [fund its development](https://github.com/sponsors/claviska) by becoming a sponsor. There are multiple tiers to choose from with benefits at every level, including prioritized support, bug fixes, feature requests, and advertising.
👇 Your support is very much appreciated! 👇
- [Become a sponsor](https://github.com/sponsors/claviska)
- [Star on GitHub](https://github.com/shoelace-style/shoelace/stargazers)
- [Follow on Twitter](https://twitter.com/shoelace_style)
Whether you're building Shoelace or building something _with_ Shoelace — have fun creating! 🥾
Web Awesome is available under the terms of the [MIT License](LICENSE.md).
Animate elements declaratively with over 500 baked-in presets, or roll your own with custom keyframes. Powered by the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API).
To animate an element, wrap it in `<sl-animation>` and set a `name` and `duration`.
?> The animation will be applied only to the first child element found in `<sl-animation>`.
## Examples
### Animations & Easings
This example demonstrates all of the baked-in animations and easings. All animations were generated based on the popular [Animate.css](https://animate.style/) and [Animista](https://animista.net/) projects.
playbackRate.tooltipFormatter = val => `Playback Rate = ${val}`;
</script>
<style>
.animation-sandbox .box {
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-50);
}
.animation-sandbox .controls {
max-width: 300px;
margin-top: 2rem;
}
.animation-sandbox .controls sl-select {
margin-bottom: 1rem;
}
</style>
```
### Using Intersection Observer
Use an [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) to control the animation when an element enters or exits the viewport. For example, scroll the box below in and out of your screen. The animation stops when the box exits the viewport and restarts each time it enters the viewport.
When you don't have an image to use, you can set the `initials` attribute to show something more personalized than an icon.
```html preview
<sl-avatar initials="SL"></sl-avatar>
```
### Custom Icons
When no image or initials are set, an icon will be shown. The default avatar shows a generic "user" icon, but you can customize this with the `icon` slot.
```html preview
<sl-avatar>
<sl-icon slot="icon" name="image"></sl-icon>
</sl-avatar>
<sl-avatar>
<sl-icon slot="icon" name="archive"></sl-icon>
</sl-avatar>
<sl-avatar>
<sl-icon slot="icon" name="briefcase"></sl-icon>
</sl-avatar>
```
### Shapes
Avatars can be shaped using the `shape` attribute.
Badges are used to draw attention and display statuses or counts.
```html preview
<sl-badge>Badge</sl-badge>
```
## Examples
### Types
Set the `type` attribute to change the badge's type.
```html preview
<sl-badge type="primary">Primary</sl-badge>
<sl-badge type="success">Success</sl-badge>
<sl-badge type="info">Info</sl-badge>
<sl-badge type="warning">Warning</sl-badge>
<sl-badge type="danger">Danger</sl-badge>
```
### Pill Badges
Use the `pill` attribute to give badges rounded edges.
```html preview
<sl-badge type="primary" pill>Primary</sl-badge>
<sl-badge type="success" pill>Success</sl-badge>
<sl-badge type="info" pill>Info</sl-badge>
<sl-badge type="warning" pill>Warning</sl-badge>
<sl-badge type="danger" pill>Danger</sl-badge>
```
### Pulsating Badges
Use the `pulse` attribute to draw attention to the badge with a subtle animation.
```html preview
<div class="badge-pulse">
<sl-badge type="primary" pill pulse>1</sl-badge>
<sl-badge type="success" pill pulse>1</sl-badge>
<sl-badge type="info" pill pulse>1</sl-badge>
<sl-badge type="warning" pill pulse>1</sl-badge>
<sl-badge type="danger" pill pulse>1</sl-badge>
</div>
<style>
.badge-pulse sl-badge:not(:last-of-type) {
margin-right: 1rem;
}
</style>
```
### With Buttons
One of the most common use cases for badges is attaching them to buttons. To make this easier, badges will be automatically positioned at the top-right when they're a child of a button.
```html preview
<sl-button>
Requests
<sl-badge pill>30</sl-badge>
</sl-button>
<sl-button style="margin-left: 1rem;">
Warnings
<sl-badge type="warning" pill>8</sl-badge>
</sl-button>
<sl-button style="margin-left: 1rem;">
Errors
<sl-badge type="danger" pill>6</sl-badge>
</sl-button>
```
### With Menu Items
When including badges in menu items, use the `suffix` slot to make sure they're aligned correctly.
It's often helpful to have a button that works like a link. This is possible by setting the `href` attribute, which will make the component render an `<a>` under the hood. This gives you all the default link behavior the browser provides (e.g. <kbd>CMD/CTRL/SHIFT + CLICK</kbd>) and exposes the `target` and `download` attributes.
?> When a `target` is set, the link will receive `rel="noreferrer noopener"` for [security reasons](https://mathiasbynens.github.io/rel-noopener/).
### Setting a Custom Width
As expected, buttons can be given a custom width by setting its `width`. This is useful for making buttons span the full width of their container on smaller screens.
Use the `caret` prop to add a dropdown indicator when a button will trigger a dropdown, menu, or popover.
```html preview
<sl-button size="small" caret>Small</sl-button>
<sl-button size="medium" caret>Medium</sl-button>
<sl-button size="large" caret>Large</sl-button>
```
### Loading
Use the `loading` prop to make a button busy. The width will remain the same as before, preventing adjacent elements from moving around. Clicks will be suppressed until the loading state is removed.
Set the color picker's format with the `format` attribute. Valid options include `hex`, `rgb`, and `hsl`. Note that the color picker will accept any parsable format (including CSS color names) regardless of this option.
Details show a brief summary and expand to show additional content.
```html preview
<sl-details summary="Toggle Me">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
```
## Examples
### Disabled
Use the `disable` attribute to prevent the details from expanding.
```html preview
<sl-details summary="Disabled" disabled>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
```
### Grouping Details
Details are designed to function independently, but you can simulate a group or "accordion" where only one is shown at a time by listening for the `slShow` event.
```html preview
<div class="details-group-example">
<sl-details summary="First" open>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
<sl-details summary="Second">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
<sl-details summary="Third">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
By design, a dialog's height will never exceed that of the viewport. As such, dialogs will not scroll with the page ensuring the header and footer are always accessible to the user.
By default, the drawer slides out of its [containing block](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#Identifying_the_containing_block), which is usually the viewport. To make the drawer slide out of its parent element, set this prop and add `position: relative` to the parent.
By design, a drawer's height will never exceed 100% of its container. As such, drawers will not scroll with the page to ensure the header and footer are always accessible to the user.
Dropdowns expose additional content that "drops down" in a panel.
Dropdowns consist of a trigger and a panel. By default, activating the trigger will expose the panel and interacting outside of the panel will close it.
Dropdowns are designed to work well with [menus](/components/menu.md) to provide a list of options the user can select from. However, dropdowns can also be used in lower-level applications (e.g. [color picker](/components/color-picker.md) and [select](/components/select.md)). The API gives you complete control over showing, hiding, and positioning the panel.
The preferred placement of the dropdown can be set with the `placement` attribute. Note that the actual position may vary to ensure the panel remains in the viewport.
```html preview
<sl-dropdown placement="top-start">
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item>Cut</sl-menu-item>
<sl-menu-item>Copy</sl-menu-item>
<sl-menu-item>Paste</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>Find</sl-menu-item>
<sl-menu-item>Replace</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
### Distance
The distance from the panel to the trigger can be customized using the `distance` attribute. This value is specified in pixels.
```html preview
<sl-dropdown distance="30">
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item>Cut</sl-menu-item>
<sl-menu-item>Copy</sl-menu-item>
<sl-menu-item>Paste</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>Find</sl-menu-item>
<sl-menu-item>Replace</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
### Skidding
The offset of the panel along the trigger can be customized using the `skidding` attribute. This value is specified in pixels.
```html preview
<sl-dropdown skidding="30">
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item>Cut</sl-menu-item>
<sl-menu-item>Copy</sl-menu-item>
<sl-menu-item>Paste</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>Find</sl-menu-item>
<sl-menu-item>Replace</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
### Hoisting
Dropdown panels will be clipped if they're inside a container that has `overflow: auto|hidden`. The `hoist` attribute forces the panel to use a fixed positioning strategy, allowing it to break out of the container. In this case, the panel will be positioned relative to its containing block, which is usually the viewport unless an ancestor uses a `transform`, `perspective`, or `filter`. [Refer to this page](https://developer.mozilla.org/en-US/docs/Web/CSS/position#fixed) for more details.
Forms collect data that can easily be processed and sent to a server.
All Shoelace components make use of a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate markup, styles, and behavior. One caveat of this approach is that native `<form>` elements will not recognize Shoelace form controls.
This component solves that problem by serializing _both_ Shoelace form controls and native form controls when the form is submitted. The resulting form data is exposed in the `slSubmit` event as a [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) object in `event.detail.formData`. You can also find an array of form controls in `event.detail.formControls`.
Shoelace forms don't make use of `action` and `method` attributes and they don't submit the same was as native forms. To handle submission, you need to listen for the `slSubmit` event as shown in the example below and make an XHR request with the resulting form data.
// Example 2: Output all form control names + values
//
for (const entry of formData.entries()) {
output += `${entry[0]}: ${entry[1]}\n`;
}
alert(output);
//
// Example 3: Get all form controls that were serialized as
// an array of HTML elements
//
console.log(event.detail.formControls);
});
</script>
```
## Form Control Validation
Client-side validation can be enabled through the browser's [constraint validations API](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation) for many form controls. You can enable it using props such as `required`, `pattern`, `minlength`, and `maxlength`. As the user interacts with the form control, the `invalid` attribute will reflect its validity based on its current value and the constraints that have been defined.
When a form control is invalid, the containing form will not be submitted. Instead, the browser will show the user a relevant error message. If you don't want to use cilent-side validation, you can suppress this behavior by adding `novalidate` to the `<sl-form>` element.
All form controls support validation, but not all validation props are available for every component. Refer to a component's documentation to see which validation props it supports.
Note that validity is not checked until the user interacts with the control or its containing form is submitted. This prevents required controls from being rendered as invalid right away, which can result in a poor user experience. If you need this behavior, set the `invalid` attribute initially.
!> Client-side validation can be used to improve the UX of forms, but it is not a replacement for server-side validation. **You should always validate and sanitize user input on the server!**
### Required Fields
To make a field required, use the `required` prop. The form will not be submitted if a required form control is empty.
const form = document.querySelector('.input-validation-required');
form.addEventListener('slSubmit', () => alert('All fields are valid!'));
</script>
```
### Input Patterns
To restrict a value to a specific [pattern](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern), use the `pattern` attribute. This example only allows the letters A-Z, so the form will not submit if a number or symbol is entered. This only works with `<sl-input>` elements.
const form = document.querySelector('.input-validation-type');
form.addEventListener('slSubmit', () => alert('All fields are valid!'));
</script>
```
### Custom Validation
To create a custom validation error, use the `setCustomValidity` method. The form will not be submitted when this method is called with anything other than an empty string, and its message will be shown by the browser as the validation error. To make the input valid again, call the method a second time with an empty string as the argument.
const form = document.querySelector('.input-validation-custom');
const input = form.querySelector('sl-input');
form.addEventListener('slSubmit', () => alert('All fields are valid!'));
input.addEventListener('slInput', () => {
if (input.value === 'shoelace') {
input.setCustomValidity('');
} else {
input.setCustomValidity('Hey, you\'re supposed to type \'shoelace\' before submitting this!');
}
});
</script>
```
### Custom Validation Styles
The `invalid` attribute reflects the form control's validity, so you can style invalid fields using the `[invalid]` selector. The example below demonstrates how you can give erroneous fields a different appearance. Type something other than "shoelace" to demonstrate this.
To opt out of the browser's built-in validation and use your own, add the `novalidate` attribute to the form. This will ignore all constraints and prevent the browser from showing its own warnings when form controls are invalid.
Remember that the `invalid` prop on form controls reflects validity as defined by the [constraint validation API](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation). You can set it initially, but the `invalid` prop will update as the user interacts with the form control. As such, you should not rely on it to set invalid styles using a custom validation library.
Instead, toggle a class and target it in your stylesheet as shown below.
Icons are symbols that can be used to represent or provide context to various options and actions within an application.
Shoelace comes bundled with over 1,100 icons courtesy of the [Bootstrap Icons](https://icons.getbootstrap.com/) project. Click or tap on an icon below to copy the name and use it like this.
Icons are sized relative to the current font size. To change their size, set the `font-size` property on the icon itself or on a parent element as shown below.
```html preview
<div style="font-size: 32px;">
<sl-icon name="exclamation-triangle"></sl-icon>
<sl-icon name="archive"></sl-icon>
<sl-icon name="battery-charging"></sl-icon>
<sl-icon name="bell"></sl-icon>
<sl-icon name="clock"></sl-icon>
<sl-icon name="download"></sl-icon>
<sl-icon name="file-earmark"></sl-icon>
<sl-icon name="flag"></sl-icon>
<sl-icon name="heart"></sl-icon>
<sl-icon name="image"></sl-icon>
<sl-icon name="lightning"></sl-icon>
<sl-icon name="mic"></sl-icon>
<sl-icon name="search"></sl-icon>
<sl-icon name="star"></sl-icon>
<sl-icon name="trash"></sl-icon>
<sl-icon name="x-circle"></sl-icon>
</div>
```
### Custom Icons
Custom icons can be loaded by setting the `src` attribute. Only SVG images are supported
Compare visual differences between similar photos with a sliding panel.
For best results, use images that share the same dimensions. The slider can be controlled by dragging or pressing the left and right arrow keys. (Tip: press shift + arrows to move the slider in larger intervals, or home + end to jump to the beginning or end.)
```html preview
<sl-image-comparer>
<img slot="before" src="https://images.unsplash.com/photo-1517331156700-3c241d2b4d83?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80&sat=-100&bri=-5" alt="Grayscale version of kittens in a basket looking around.">
<img slot="after" src="https://images.unsplash.com/photo-1517331156700-3c241d2b4d83?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="Color version of kittens in a basket looking around.">
</sl-image-comparer>
```
## Examples
### Initial Position
Use the `position` attribute to set the initial position of the slider. This is a percentage from `0` to `100`.
```html preview
<sl-image-comparer position="0">
<img slot="before" src="https://images.unsplash.com/photo-1520903074185-8eca362b3dce?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1200&q=80" alt="A person sitting on bricks wearing untied boots.">
<img slot="after" src="https://images.unsplash.com/photo-1520640023173-50a135e35804?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2250&q=80" alt="A person sitting on a yellow curb tying shoelaces on a boot.">
Menus provide a list of options for the user to choose from.
Use [menu items](/components/menu-item.md), [menu dividers](/components/menu-divider.md), and [menu labels](/components/menu-label.md) to compose a menu.
Skeletons are used to show where content will eventually be drawn.
These are simple containers for scaffolding layouts that mimic what users will see when content has finished loading. This prevents large areas of empty space during asynchronous operations.
Skeletons try not to be opinionated, as there are endless possibilities for designing layouts. Therefore, you'll likely use more than one skeleton to create the effect you want. If you find yourself using them frequently, consider creating a template that renders them with the desired arrangement and styles.
The default effect is `sheen`, which animates a sheen horizontally across the skeleton. There's also `pulse`, which fades the skeleton in and out. To disable animations, use `none`. Effects are intentionally subtle, as they can be distracting otherwise.
```html preview
<div class="skeleton-effects">
<sl-skeleton effect="sheen"></sl-skeleton>
Sheen
<sl-skeleton effect="pulse"></sl-skeleton>
Pulse
<sl-skeleton effect="none"></sl-skeleton>
None
</div>
<style>
.skeleton-effects {
font-size: var(--sl-font-size-small);
}
.skeleton-effects sl-skeleton:not(:first-child) {
margin-top: 1rem;
}
</style>
```
### Paragraphs
Use multiple skeletons and some clever styles to simulate paragraphs.
```html preview
<div class="skeleton-paragraphs">
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
</div>
<style>
.skeleton-paragraphs sl-skeleton {
margin-bottom: 1rem;
}
.skeleton-paragraphs sl-skeleton:nth-child(2) {
width: 95%;
}
.skeleton-paragraphs sl-skeleton:nth-child(4) {
width: 90%;
}
.skeleton-paragraphs sl-skeleton:last-child {
width: 50%;
}
</style>
```
### Avatars
Set a matching width and height to make a circle, square, or rounded avatar skeleton.
```html preview
<div class="skeleton-avatars">
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
</div>
<style>
.skeleton-avatars sl-skeleton {
display: inline-block;
width: 3rem;
height: 3rem;
margin-right: .5rem;
}
.skeleton-avatars sl-skeleton:nth-child(1) {
--border-radius: 0;
}
.skeleton-avatars sl-skeleton:nth-child(2) {
--border-radius: var(--sl-border-radius-medium);
}
</style>
```
### Custom Shapes
Use the `--border-radius` custom property to make circles, squares, and rectangles. For more complex shapes, you can apply `clip-path` to the `indicator` part. [Try Clippy](https://bennettfeely.com/clippy/) if you need help generating custom shapes.
Spinners are used to show the progress of an indeterminate operation.
```html preview
<sl-spinner></sl-spinner>
```
## Examples
### Size
Spinners are sized relative to the current font size. To change their size, set the `font-size` property on the spinner itself or on a parent element as shown below.
Tab groups organize content into a container that shows one section at a time.
Tab groups make use of [tabs](/components/tab.md) and [tab panels](/components/tab-panel.md). Each tab must be slotted into the `nav` slot and its `panel` must refer to a tab panel of the same name.
Tooltips display additional information based on a specific action.
A tooltip's target is its _first child element_, so you should only wrap one element inside of the tooltip. If you need the tooltip to show up for multiple elements, nest them inside a container first.
Tooltips use `display: contents` so they won't interfere with how elements are positioned in a flex or grid layout.
```html preview
<sl-tooltip content="This is a tooltip">
<sl-button>Hover Me</sl-button>
</sl-tooltip>
```
## Examples
### Placement
Use the `placement` attribute to set the preferred placement of the tooltip.
Shoelace has a budding community of designers and developers that are building amazing things with web components. We'd love for you to become a part of it!
## Discord
The [community chat](https://discord.gg/mg8f26C) is open to the public and powered by [Discord](https://discord.com/). This is the best place to:
- Ask questions
- Get feedback
- Show the community what you're working on
- Hang out with other designers, developers, and Shoelace users
- Talk to the creator
Please be respectful of other users and remember that Shoelace is an open source project. We'll try to help when we can, but there's no guarantee we'll be able solve your problem. Please manage your expectations and don't forget to contribute back to the conversation when you can!
Follow [@shoelace_style](https://twitter.com/shoelace_style) on Twitter for general updates and announcements about Shoelace. This is a great place to say "hi" or to share something you're working on. You're also welcome to follow [@claviska](https://twitter.com/claviska), the creator, for tweets about web components, web development, and life.
**Please avoid using Twitter for support questions.** The community chat is a much better place to share code snippets, screenshots, and other troubleshooting info. You'll have much better luck there, as more users will have a chance to help you.
Oh, and don't forget to tell your followers about Shoelace!
Shoelace components can be customized at a high level through design tokens. This gives you control over theme colors and general styling. For more advanced customizations, you can make use of component parts and custom properties to target individual components.
## Design Tokens
Shoelace makes use of several design tokens to provide a consistent appearance across components. You can customize them and use them in your own application with pure CSS — no preprocessor required.
Design tokens offer a high-level way to customize the library with minimal effort. There are no component-specific variables, however, as design tokens are intended to be generic and highly reusable. To customize an individual component, refer to the section entitled [Component parts](#component-parts).
Design tokens are CSS custom properties ("CSS variables") that are defined in the `:root` block of `shoelace.css`. This stylesheet is imported when you install Shoelace, so design tokens are available on your page at that point. Because design tokens are global, they're always prefixed with `--sl` to avoid collisions with other libraries.
To customize a design token, simply override it in your stylesheet using a `:root` block.
```css
:root{
/* Changes the primary color to a shade of orange at 90% saturation */
--sl-color-primary-hue:30;
--sl-color-primary-saturation:90%;
}
```
Many design tokens are described further along in this documentation. For a complete list, refer to `shoelace.scss` in the project's [source code](https://github.com/shoelace-style/shoelace/blob/current/src/styles/shoelace.scss).
!> **Never modify variables directly in `shoelace.css`** because your changes will be overwritten when you upgrade the library. Even if you don't plan on upgrading, it's always better to override design tokens in your own stylesheet for better maintainability.
## Component Parts
Whereas design tokens offer a high-level way to customize the library, component parts offer a low-level way to customize individual components. Again, this is done with pure CSS — no preprocessor required.
Shoelace components use a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate their styles and behaviors. As a result, you can't simply target their internals with the usual CSS selectors. Instead, components expose "parts" that can be targeted with the [CSS part selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part), or `::part()`.
Here's an example that modifies buttons with the `tomato-button` class.
```html preview
<sl-button class="tomato-button">
Tomato Button
</sl-button>
<style>
.tomato-button::part(base) {
background: white;
border: solid 1px tomato;
}
.tomato-button::part(base):hover {
background: rgba(255, 99, 71, .1);
}
.tomato-button::part(base):active {
background: rgba(255, 99, 71, .2);
}
.tomato-button::part(base):focus {
box-shadow: 0 0 0 3px rgba(255, 99, 71, .33);
}
.tomato-button::part(label) {
color: tomato;
}
</style>
```
At first glance, this approach might seem a bit verbose or even limiting, but it comes with a few important advantages:
- Customizations can be made to components with explicit selectors, such as `::part(icon)`, rather than implicit selectors, such as `.button > div > span + .icon`, that are much more fragile.
- The internal structure of a component will likely change as it evolves. By exposing component parts through an API, the internals can be reworked without fear of breaking customizations as long as its parts remain intact.
- It encourages us to think more about how components are designed and how customizations should be allowed before userscan take advantage of them. Once we opt a part into the component's API, it's guaranteed to be supported and can't be removed until a major version of the library is released.
Most (but not all) components expose parts. You can find them in each component's API documention under the "CSS Parts" section.
## Custom Properties
For convenience, some components expose CSS custom properties you can override. These are not design tokens, nor do they have the same `--sl-` prefix since they're scoped to a component.
You can set custom properties on a component in your stylesheet.
```css
sl-avatar {
--size: 6rem;
}
```
This will also work if you need to target a subset of components with a specific class.
```css
sl-avatar.your-class {
--size: 6rem;
}
```
Alternatively, you can set them inline directly on the element.
```html
<sl-avatar style="--size: 6rem;"></sl-avatar>
```
Not all components expose CSS custom properties. For those that do, they can be found in the component's API documentation.
You can use Shoelace via CDN or by installing it locally.
## CDN Installation (Recommended)
The easiest way to install Shoelace is with the CDN. A lightweight loader will be added to your page that registers components asynchronously as you use them. It's like magic. ✨
Now you can [start using Shoelace!](/getting-started/usage.md)
## Local Installation
If you don't want to use the CDN, you can install Shoelace locally with the following command.
```bash
npm install @shoelace-style/shoelace
```
It's up to you to make the source files available to your app. One way to do this is to create a route in your app called `/assets/shoelace` that serves static files from `node_modules/@shoelace-style/shoelace`.
Once you've done that, add the following tags to your page. Make sure to update `href` and `src` so they point to the route you created.
A [custom elements bundle](https://stenciljs.com/docs/custom-elements) is available so you can import components and register them individually. This is a more flexible alternative to the lazy loading approach, but it requires the use of a bundler such as [webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/guide/en/). You'll also need to manage static assets on your own.
Instructions vary depending on the bundler you're using.
## Using webpack
To use the custom elements bundle with webpack, install Shoelace first.
```bash
npm install @shoelace-style/shoelace
```
Your `webpack.config.js` should look something like what's shown below. Note how assets such as icons are copied from `node_modules` to `dist/icons` via the `CopyPlugin` utility.
For convenience, the bundle also exports a `defineCustomElements()` method. When this method is called, it will register all Shoelace components in the bundle.
While convenient for prototyping, importing all components will make your bundle larger. For best results, only import the components you're actually using.
?> An [example webpack project](https://github.com/shoelace-style/webpack-example) is also available on GitHub for your convenience.
## Using Rollup
To use the custom elements bundle with Rollup, install Shoelace first.
```bash
npm install @shoelace-style/shoelace
```
Your `rollup.config.js` should look something like what's shown below. Note how assets such as icons are copied from `node_modules` to `dist/icons` via the `rollup-copy-plugin`.
For convenience, the bundle also exports a `defineCustomElements()` method. When this method is called, it will register all Shoelace components in the bundle.
While convenient for prototyping, importing all components will make your bundle larger. For best results, only import the components you're actually using.
?> An [example Rollup project](https://github.com/shoelace-style/rollup-example) is also available on GitHub for your convenience.
<p><strong>A forward-thinking library of web components.</strong></p>
<ul>
<li>Works with all frameworks 🧩</li>
<li>Works with CDNs 🚛</li>
<li>Fully customizable with CSS 🎨</li>
<li>Includes an official dark theme 🌛</li>
<li>Built with accessibility in mind ♿️</li>
<li>Open source 😸</li>
</ul>
<p>Designed in New Hampshire by <a href="https://twitter.com/claviska" rel="noopener" target="_blank">Cory LaViska</a>.</p>
</div>
<div class="splash-end">
<img class="splash-image" src="/assets/images/undraw-content-team.svg" alt="Cartoon of people assembling components while standing on a giant laptop.">
Now you have access to all of Shoelace's components! Try adding a button:
```html
<sl-button>Click me</sl-button>
```
See the [installation instructions](getting-started/installation.md) for more details and other ways to install Shoelace.
## New to Web Components?
**TL;DR**–we finally have a way to create [our own HTML elements](https://html.spec.whatwg.org/multipage/custom-elements.html) and use them in any framework we want!
Thanks to the popularity of frameworks such as Angular, Vue, and React, component-driven development has become a part of our every day lives. Components help us encapsulate styles and behaviors into reusable building blocks. They make a lot of sense in terms of design, development, and testing.
Unfortunately, _framework-specific_ components fail us in a number of ways:
- You can only use them in the framework they're designed for 🔒
- Their lifespan is limited to that of the framework's ⏳
- New frameworks/versions can lead to breaking changes, requiring substantial effort to update components 😭
Web components solve these problems. They're [supported by all modern browsers](https://caniuse.com/#feat=custom-elementsv1), they're framework-agnostic, and they're [part of the standard](https://developer.mozilla.org/en-US/docs/Web/Web_Components), so we know they'll be supported for many years to come.
This is the technology that Shoelace is built on.
## What Problem Does This Solve?
Shoelace provides a collection of professionally designed, every day UI components built on a framework-agnostic technology. Why spend hundreds of hours (or more) building a design system from scratch? Why make a component library that only works with one framework?
With Shoelace, you can:
- Start building things faster (no need to roll your own buttons)
- Build multiple apps with different frameworks that all share the same UI
- Skip having to learn a new component library every time you switch frameworks
If your organization is looking to build a design system, [Shoelace will save you thousands of dollars](https://medium.com/eightshapes-llc/and-you-thought-buttons-were-easy-26eb5b5c1871).* All the foundational components you need are right here, ready to be customized for your brand. And since it's built on web standards, browsers will continue to support it for many years to come.
Whether you use Shoelace as a starting point for your organization's design system or for a fun personal project, there's no limit to what you can do with it.
<small>*Please consider giving back some of what you save by [supporting this project with a sponsorship](https://github.com/sponsors/claviska).</small>
## Browser Support
Shoelace is tested in the latest two versions of the following browsers.
Critical bug fixes in earlier versions will be addressed based on their severity and impact.
If you need to support IE11 or pre-Chromium Edge, this library isn't for you. Although web components can (to some degree) be polyfilled for legacy browsers, supporting them is outside the scope of this project. If you're using Shoelace in such a browser, you're gonna have a bad time. ⛷
## License
Shoelace is designed in New Hampshire by [Cory LaViska](https://twitter.com/claviska). It's available under the terms of the MIT license.
Designing, developing, and supporting this library requires a lot of time, effort, and skill. I'd like to keep it open source so everyone can use it, but that doesn't provide me with any income.
**Therefore, if you're using my software to make a profit,** I respectfully ask that you help [fund its development](https://github.com/sponsors/claviska) by becoming a sponsor. There are multiple tiers to choose from with benefits at every level, including prioritized support, bug fixes, feature requests, and advertising.
Special thanks to the following projects and individuals that helped make Shoelace possible.
- Components are compiled by [Stencil](https://stenciljs.com/)
- Documentation is powered by [Docsify](https://docsify.js.org/)
- CDN services are provided by [jsDelivr](https://www.jsdelivr.com/)
- Theme colors and form controls are inspired by [Element](https://element.eleme.io/)
- Icons are courtesy of [Bootstrap Icons](https://icons.getbootstrap.com/)
- Illustrations are courtesy of [unDraw](https://undraw.co/)
- Positioning of menus, tooltips, et al is handled by [Popper.js](https://popper.js.org/)
- The animation component was inspired by [animatable-component](https://github.com/proyecto26/animatable-component)
- The Shoelace logo was designed with a single shoelace by [Adam K Olson](https://twitter.com/adamkolson)
## Previous Versions
Shoelace v1 has been deprecated, but you can still [view the docs](https://v1.shoelace.style) or [download the source](https://github.com/shoelace-style/shoelace/releases/tag/1.0.0-beta.25) for historical purposes.
If you're new to this project, please see the [installation instructions](/getting-started/installation.md) for v2 instead.
The roadmap tracks the status of components and features that are planned for development.
## Versioning
Shoelace follows [Semantic Versioning](https://semver.org/). Breaking changes in components with the <sl-badge type="primary" pill>Stable</sl-badge> badge will not be accepted until the next major version. As such, all contributions must consider the project's roadmap and take this into consideration. Features that are deemed no longer necessary will be deprecated but not removed.
Components with the <sl-badge type="warning" pill>Experimental</sl-badge> badge should not be used in production. They are made available as release candidates for development and testing purposes. As such, changes to experimental components will not be subject to semantic versioning.
## Changelog
The changelog is available in the project's source in the `CHANGELOG.md` file.
You can [view the most recent changelog](https://github.com/shoelace-style/shoelace/blob/next/CHANGELOG.md) on GitHub.
## 2.1 🧭
Version 2.1 is still in the planning phase. To request a feature, please [submit an issue](https://github.com/shoelace-style/shoelace/issues) on GitHub. Make sure to search for existing issues and vote using 👍 to add your support!
?> Is there a feature you really want to see here? Sponsoring Shoelace is the best way to prioritize its development. [Learn more](https://github.com/sponsors/claviska)
## 2.0 🧪
Shoelace 2.0 is currently in beta. The primary goal of the beta period is to ensure the library's stability. New features may be introduced, but nothing specific is planned.
At this point, bugs and API issues receive the highest priority.
Shoelace ships with a dark theme that complements the default light theme. You can even take things a step further by designing your own custom theme.
The default theme is included as part of `shoelace.css` and should always be loaded first, even if you want to use another theme exclusively. The default theme contains important base tokens and utilities that many components rely on.
## Dark Mode
To install the dark theme, add the following to your page.
**Themes must be activated after importing!** You can do this by adding the theme's class name to the element you want the theme to apply to. This is usually `<body>`, but themes can also be applied to container elements, making it possible to use more than one theme on the same page.
```html
<sl-button>Light Mode</sl-button>
<divclass="sl-theme-dark">
<sl-button>Dark Mode</sl-button>
</div>
```
### Detecting the User's Color Scheme Preference
Shoelace doesn't try to auto-detect the user's light/dark mode preference. This should be done at the application level. As a best practice, to provide a dark theme in your app, you should:
- Check for [`prefers-color-scheme`](https://stackoverflow.com/a/57795495/567486) and use its value by default
- Allow the user to override the setting in your app
- Remember the user's preference and restore it on subsequent logins
Shoelace avoids using the `prefers-color-scheme` media query because not all apps support dark mode, and it would break things for the ones that don't.
## Creating a Theme
A theme is nothing more than a stylesheet that uses the Shoelace API to customize design tokens and/or components. To create a theme, you will need a decent understanding of CSS, including [CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) and the [`::part` selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part).
The recommended way to create a theme is to piggyback on top of the default theme, adjusting design tokens and styling components as necessary to achieve the look you want. This makes your theme lightweight and "future proof", as later versions of Shoelace may introduce new components that your theme won't support. The default theme will account for these so components won't appear to be broken.
Technically, you can roll your own theme from scratch without using the default theme as a baseline, but that approach isn't recommended.
### Theme Classes
All theme classes should use the `sl-theme-name` convention, where `name` is a lowercase, hyphen-delimited value representing the name of your theme. For example, a theme called "Purple Power" would use the `sl-theme-purple-power` class.
Every selector in a theme must be scoped to the theme's class to ensure interoperability with other themes.
### Design Tokens
[Design tokens](http://localhost:4000/#/getting-started/customizing?id=design-tokens) give you a high-level way to customize Shoelace components. You can customize them in your theme as shown below.
```css
.sl-theme-purple-power{
--sl-color-primary-hue:290;
--sl-color-primary-saturation:80%;
/* more design token customizations here */
}
```
?> Avoid scoping design tokens to `:root`. The default theme does this to provide base styles that will apply to the page even when no `sl-theme-` class is applied.
### Components
To customize individual components, use the following syntax.
```css
.sl-theme-purple-powersl-button::part(base){
/* your custom button styles here */
}
```
?> Pay special attention to each component's CSS Parts API. You usually need to use a `::part` selector when targeting components!
## Using a Custom Theme
If a theme adheres to the guidelines above, you can use it by importing the stylesheet and activating it with the theme's class name.
In fact, you can apply a theme's class to any container on the page, not just the body. This lets you use more than one theme on the same page.
## Submitting a Theme
**I am very interested in showcasing well-designed themes that complement this library.** To submit a theme for review, please [open an issue](https://github.com/shoelace-style/shoelace/issues/new) on GitHub with the theme linked or attached. Once approved, your theme will be showcased on this page.
Please note the following requirements before submitting a theme.
- Themes must be complete and of high quality
- Themes must be available under an open source license
Shoelace components are just regular HTML elements, or "custom elements" to be precise. You can use them like any other element. Each component has detailed documentation that describes its full API, including properties, events, methods, and more.
## Web Component Basics
### Properties
Many components have properties ("props") that can be set using attributes. For example, buttons accept a `size` attribute that dictates the button's size.
```html
<sl-buttonsize="small">Click me</sl-button>
```
Some props are booleans, so they only have true/false values. To activate a boolean prop, add the corresponding attribute without a value.
```html
<sl-buttondisabled>Click me</sl-button>
```
In rare cases, a prop may require an array, an object, or a function. For example, to customize the color picker's list of preset swatches, you set the `swatches` prop to an array of colors. This can be done with JavaScript.
Refer to a component's documentation for a complete list of its properties.
### Events
You can listen for standard events such as `click`, `mouseover`, etc. as you normally would. In addition, some components emit custom events. These work the same way as standard events, but are prefixed with `sl` to prevent collisions with standard events and other libraries.
Refer to a component's documentation for a complete list of its custom events.
### Methods
Some components have methods you can call to trigger various behaviors. For example, you can set focus on a Shoelace input using the `setFocus()` method.
```html
<sl-input></sl-input>
<script>
constinput=document.querySelector('sl-input');
input.setFocus();
</script>
```
Refer to a component's documentation for a complete list of its methods and their arguments.
### Slots
Many components use slots to accept content inside of them. The most common slot is the _default_ slot, which includes any content inside the component that doesn't have a `slot` attribute.
For example, a button's default slot is used to populate its label.
```html
<sl-button>Click me</sl-button>
```
Some components also have _named_ slots. A named slot can be populated by adding a child element with the appropriate `slot` attribute. Notice how the icon below has the `slot="prefix"` attribute? This tells the component to place the icon into its `prefix` slot.
```html
<sl-button>
<sl-iconslot="prefix"name="gear"></sl-icon>
Settings
</sl-button>
```
The location of a named slot doesn't matter. You can put it anywhere inside the component and the browser will move it to the right place automatically!
Refer to a component's documentation for a complete list of available slots.
### Don't Use Self-closing Tags
Custom elements cannot have self-closing tags. Similar to `<script>` and `<textarea>`, you must always include the full closing tag.
```html
<!-- Don't do this -->
<sl-input/>
<!-- Always do this -->
<sl-input></sl-input>
```
### Differences from Native Elements
You might expect similarly named elements to share the same API as native HTML elements. This is not always the case. Shoelace components **are not** designed to be one-to-one replacements for their HTML counterparts.
For example, `<button>` and `<sl-button>` both have a `type` attribute, but it does different things (the former controls whether the button submits a form and the latter controls the button's appearance). Similarly, you can't call `focus()` on a Shoelace input — you need to use the component's `setFocus()` method instead. There are technical reasons for some of these design decisions that are outside the scope of this page.
?> **Don't make assumptions about a component's API!** To prevent unexpected behaviors, please take the time to review the documentation and make sure you understand what each property, method, and event is intended to do.
## Code Completion
Shoelace ships with a `custom-elements.json` file that can be used to describe its components to supportive editors, providing code completion (also known as "code hinting" or "IntelliSense"). To enable this, you need to tell your editor where this file is.
If `settings.json` already exists in your project, simply add the `html.customData` line to the root of the object.
## React
React [doesn't play nice](https://custom-elements-everywhere.com/#react) with custom elements —it's a bit finicky about props.
> React passes all data to Custom Elements in the form of HTML attributes. For primitive data this is fine, but the system breaks down when passing rich data, like objects or arrays. In these instances you end up with stringified values like `some-attr="[object Object]"` which can't actually be used.
Event handling can also be cumbersome.
> Because React implements its own synthetic event system, it cannot listen for DOM events coming from Custom Elements without the use of a workaround. Developers will need to reference their Custom Elements using a ref and manually attach event listeners with addEventListener. This makes working with Custom Elements cumbersome.
Fortunately, there's a utility that will wrap Shoelace components so you can use them as if they were React components. 👇
?> If you're starting a new project, consider using [Preact](https://preactjs.com/) as an alternative. It shares the same API as React and [handles custom elements quite well](https://custom-elements-everywhere.com/#preact).
### Wrapping Components
You can use [this utility](https://www.npmjs.com/package/@shoelace-style/react-wrapper) to wrap Shoelace components so they work like like regular React components. To install it, use this command.
```bash
npm install @shoelace-style/react-wrapper
```
Now you can "import" Shoelace components as React components! Remember to [install Shoelace](/getting-started/installation.md) first, otherwise this won't work.
A reference ("ref") to the underlying custom element is exposed through the `element` property so you can access it directly. This is useful for calling methods.
Vue [plays nice](https://custom-elements-everywhere.com/#vue) with custom elements. You just have to tell it to ignore Shoelace components. This is pretty easy because they all start with `sl-`.
```js
Vue.config.ignoredElements=[/^sl-/];
newVue({...});
```
### Binding Complex Data
When binding complex data such as objects and arrays, use the `.prop` modifier to make Vue bind them as a property instead of an attribute.
```html
<sl-color-picker:swatches.prop="mySwatches"/>
```
### Two-way Binding
One caveat is there's currently [no support for v-model on custom elements](https://github.com/vuejs/vue/issues/7830), but you can still achieve two-way binding manually.
If that's too verbose, you can use a custom directive instead. 👇
### Using a Custom Directive
You can use [this utility](https://www.npmjs.com/package/@shoelace-style/vue-sl-model) to add a custom directive to Vue that will work just like `v-model` but for Shoelace components. To install it, use this command.
```bash
npm install @shoelace-style/vue-sl-model
```
Next, import the directive and enable it like this.
Now you can use the `v-sl-model` directive to keep your data in sync!
```html
<sl-inputv-sl-model="name">
```
## Angular
Angular [plays nice](https://custom-elements-everywhere.com/#angular) with custom elements. Just make sure to apply the custom elements schema as shown below.
Border radius tokens are used to give sharp edges a more subtle, rounded effect. They use rem units so they scale with the base font size. The pixel values displayed are based on a 16px font size.
Color tokens are used to maintain consistent color use throughout your app.
## Theme Colors
Theme colors are based on HSL values rather than hex or RGB. This technique lets us generate more consistent palettes for every theme color, ranging from 5% to 95% lightness. There are no 0% or 100% values for theme colors. Use `--sl-color-black` and `--sl-color-white` instead.
Theme colors include primary, gray, success, info, warning, and danger. They are used extensively throughout the library to maintain a consistent appearance across components.
To customize a theme color, change its respective hue, saturation, and text tokens. Possible theme colors include `primary`, `gray`, `success`, `info`, `warning`, and `danger`.
This will make all colors in the primary color palette various shades of purple.
```css
:root{
--sl-color-primary-hue:290;
--sl-color-primary-saturation:87%;
--sl-color-primary-text:var(--sl-color-white);
}
```
You can update these values on the client and the changes will reflect instantly. To update the primary color using JavaScript, try this.
?> Although CSS lets you override custom properties on specific elements, these values _must_ be scoped to the `:root` block for the entire palette to be recalculated. [See this page for details.](https://stackoverflow.com/questions/52015737/css-scoped-custom-property-ignored-when-used-to-calculate-variable-in-outer-scop)
Elevation tokens are used to give elements the appearance of being raised off the page. Use them with the `box-shadow` property. These are especially useful for menus, popovers, and dialogs.
| `--sl-font-sans` | -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' | <span style="font-family: var(--sl-font-sans)">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-serif` | Georgia, 'Times New Roman', serif | <span style="font-family: var(--sl-font-serif)">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-mono` | Menlo, Monaco, 'Courier New', monospace | <span style="font-family: var(--sl-font-mono)">The quick brown fox jumped over the lazy dog.</span> |
## Font Size
Font sizes use `rem` units so they scale with the base font size. The pixel values displayed are based on a 16px font size.
| `--sl-font-weight-light` | 300 | <span style="font-weight: var(--sl-font-weight-light);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-weight-normal` | 400 | <span style="font-weight: var(--sl-font-weight-normal);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-weight-semibold` | 500 | <span style="font-weight: var(--sl-font-weight-semibold);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-weight-bold` | 700 | <span style="font-weight: var(--sl-font-weight-bold);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-letter-spacing-dense` | -0.015em | <span style="letter-spacing: var(--sl-letter-spacing-dense);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-letter-spacing-normal` | normal | <span style="letter-spacing: var(--sl-letter-spacing-normal);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-letter-spacing-loose` | 0.075em | <span style="letter-spacing: var(--sl-letter-spacing-loose);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-line-height-dense` | 1.4 | <div style="line-height: var(--sl-line-height-dense);">The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.</div> |
| `--sl-line-height-normal` | 1.8 | <div style="line-height: var(--sl-line-height-normal);">The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.</div> |
| `--sl-line-height-loose` | 2.2 | <div style="line-height: var(--sl-line-height-loose);">The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.</div> |
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.