Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unsass/utilities

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unsass/utilities

Sass mixins and functions utilities for made your development more easier.

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by7.69%
Maintainers
1
Weekly downloads
 
Created
Source

Utilities

Version Download

Sass mixins and functions utilities for made your development more easier.

Install

npm install @unsass/utilities

Usage

@use "@unsass/utilities";

API

Sass mixins

MixinDescription
disabled-touch-screenSets the disabled touch screen declaration.
disabled-pointer-eventsSets the disabled pointer events declaration.
ellipsisSets the ellipsis declaration.
ellipsis-multiline($line, $orient)Sets the ellipsis multiline declaration.
font-smoothingSets the font smoothing declaration.
Disabled touch screen with utilities.disabled-touch-screen()

The following Sass...

@use "@unsass/utilities";

.foo {
    @include utilities.disabled-touch-screen {
        color: darkcyan;
    }
}

...will produce the following CSS...

@media (pointer: fine) {
    .foo {
        color: darkcyan;
    }
}
Disabled pointer events with utilities.disabled-pointer-events()

The following Sass...

@use "@unsass/utilities";

.foo {
    @include utilities.disabled-pointer-events;
}

...will produce the following CSS...

.foo {
    cursor: default;
    pointer-events: none;
}
Ellipsis rule with utilities.ellipsis()

The following Sass...

@use "@unsass/utilities";

.foo {
    @include utilities.ellipsis;
}

...will produce the following CSS...

.foo {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
Ellipsis multiline rule with utilities.ellipsis-multiline()

The following Sass...

@use "@unsass/utilities";

.foo {
    @include utilities.ellipsis-multiline;
}

...will produce the following CSS...

.foo {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
Font smoothing rule with utilities.font-smoothing()

The following Sass...

@use "@unsass/utilities";

.foo {
    @include utilities.font-smoothing;
}

...will produce the following CSS...

.foo {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

Sass functions

FunctionDescription
string-replace($string, $search, $replace)Return value without the unit.
strip-unit($value)Return value with replacement option.

Components

ComponentDescriptionSass @use prefix
stringUtilities functions for string.utilities.string-*
stripUtilities functions for strip.utilities.strip-*

Keywords

FAQs

Package last updated on 17 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc