Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@livekit/components-styles

Package Overview
Dependencies
0
Maintainers
21
Versions
17
Issues
File Explorer

Advanced tools

@livekit/components-styles

Beautiful base styling for LiveKit components that you can use as is, build upon, or create your own.

    0.2.1latest
    GitHub

Version published
Maintainers
21
Weekly downloads
1,397
decreased by-21.34%

Weekly downloads

Changelog

Source

@livekit/components-styles@0.2.1

Patch Changes

  • CSS tweaks #367 - #368 (@lukasIO)

  • add orientation prop to CarouselView - #355 (@Ocupe)

  • add pagination to GridLayout component - #350 (@Ocupe)

Readme

Source

LiveKit Components Styles

Beautiful base styling for LiveKit components that you can use as is, build upon, or create your own.

Monorepo Navigation

Dev notes

Prefix

To avoid collisions CSS all CSS selector used for LiveKit Components (classes, CSS variables, and custom data attributes) are given the same prefix. To avoid typing redundant prefixes and keep the door open for user-defined prefixes, we use PostCSS plugins (see postcss.config.js) to add the prefix during the build step. This means that you should never write a prefix inside this styles package.

The PostCSS plugins transform the CSS selectors as follows, to make it easier to understand here are a few examples with a prefix of "lk":

no prefixwith lk prefix 
.button.lk-button
--border-color--lk-border-color
var(--fg)var(--lk-fg)
[data-active='false'][data-lk-active='false']
&[data-muted='true']&[data-lk-muted='true']
⚠️ Currently not supported prefix:
no prefixwith lk prefix 
attr(data-participant-name)attr(data-lk-participant-name)
@include vs @extend

@mixin is used to group css code that has to be reused a no of times. Whereas the @extend is used in SASS to inherit(share) the properties from another css selector. @extend is most useful when the elements are almost same or identical.

The compiled css output would suggest to use @extend in cases where css classes should inherit from parent classes (e.g. .disconnect-button inherits base properties from .button).

FAQs

Last updated on 18 Mar 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc