![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@uxf/styles
Advanced tools
Readme
shade
and tint
color2k
libraryshade
) or white (tint
)import { shade } from "@uxf/styles/colors/shade";
const darker = shade("#f00", 0.1);
import { tint } from "@uxf/styles/colors/tint";
const lighter = tint("#f00", 0.1);
srOnly
import { srOnly } from "@uxf/styles/mixins/sr-only";
const example = <div style={srOnly} />;
columnsToPercent
calc()
value with relative width of provided number of columns in provided total columns (defaults is 12
) compensated by optionally provided gutter in pixelsimport { columnsToPercent } from "@uxf/styles/properties/columns-to-percent";
const example = columnsToPercent(4, 12, 24);
/* returns "calc((100% + 1.5rem) / 12 * 4)" */
encodedSvgUrl
url()
value of an encoded version of provided svgimport { encodedSvgUrl } from "@uxf/styles/properties/encoded-svg-url";
const example = encodedSvgUrl(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="0 20 20 0" /></svg>`);
repeatGridColumns
repeat()
value of provided number of columns and sizeimport { repeatGridColumns } from "@uxf/styles/properties/repeat-grid-columns";
const example = repeatGridColumns(6, "1fr"); /* returns "repeat(6, 1fr)" */
transition
transition
property for specified property or an array of propertiesimport { transition } from "@uxf/styles/properties/transition";
const example = transition(["color", "transform"], 400, "ease-in-out");
/* returns "color 400ms ease-in-out, transform 400 ease-in-out" */
mqBetween
, mqHiDpi
, mqMax
, mqMin
import { mqBetween } from "@uxf/styles/responsive/mq-between";
const example = mqBetween(320, 480)
/* returns "(min-width: 20em and (max-width: 29.9375em)" */
import { mqHiDpi } from "@uxf/styles/responsive/mq-hidpi";
const example = mqHiDpi(3)
/* returns hidpi media query string for DPR 3.0 */
window.matchMedia().matches
media queries matchBetween
, matchHiDpi
, matchMax
, matchMin
import { matchBetween } from "@uxf/styles/responsive/match-between";
const example = matchBetween(320, 480) /* returns boolean */
import { matchHiDpi } from "@uxf/styles/responsive/match-hidpi";
const example = matchHiDpi(3) /* returns boolean */
em
and rem
16
)import { em } from "@uxf/styles/units/em";
const example1 = em(320) /* returns "20em" */
const example2 = em(320, 10) /* returns "32em" */
import { rem } from "@uxf/styles/units/rem";
const example1 = rem(320) /* returns "20rem" */
const example2 = rem(320, 10) /* returns "32rem" */
emToPx
and remToPx
16
)import { emToPx } from "@uxf/styles/units/em-to-px";
const example1 = emToPx("20em") /* 320 */
const example2 = emToPx("20em", 10) /* 200 */
const example3 = emToPx("20rem", 10) /* "20rem" */
import { remToPx } from "@uxf/styles/units/rem-to-px";
const example1 = remToPx("20rem") /* 320 */
const example2 = remToPx("20rem", 10) /* 200 */
const example3 = remToPx("20%", 10) /* "20%" */
formatCssValue
import { formatCssValue } from "@uxf/styles/units/format-css-value";
const example1 = formatCssValue(0) /* returns "0" */
const example2 = formatCssValue(24) /* returns "1.5rem" */
const example3 = formatCssValue("100%") /* returns "100%" */
const example4 = formatCssValue(1, true) /* returns "1" */
percent
100
) with provided precision (defaults 2
)import { percent } from "@uxf/styles/units/percent";
const example = percent(54.874, 80, 2) /* returns 68.59 */
spacing
8
)import { spacing } from "@uxf/styles/units/spacing";
const example = spacing(4) /* returns 32 */
withUnit
import { withUnit } from "@uxf/styles/units/with-unit";
const example = withUnit(80, "vh") /* returns "80vh" */
FAQs
## Color
The npm package @uxf/styles receives a total of 249 weekly downloads. As such, @uxf/styles popularity was classified as not popular.
We found that @uxf/styles demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.