Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
karuto-typography-temp
Advanced tools
typography-desktop
is a package that exports font grouping CSS classes, such as .xlarge-bold
, for consumer web projects to consume.
These classes are generated dynamically based on the latest version of otkit-typography-desktop
design token.
The way different consumer web teams apply typography styling to their front end components is very fragmented. We have lots of duplications, overrides and human errors.
We try to solve this problem by enforcing consistency via encapsulating the entire design decision inside CSS classes.
I choose CSS class as the transport mechanism because of its simplicity, familiarity and flexibility.
Let's briefly explain the decision flow when it comes to typography. Let's use .xlarge-bold
as example.
xlarge-bold
should be one of the desktop web typography groupings inside their design system.xlarge-bold
into atomic elements, such as xlarge-bold-font-size
, xlarge-bold-font-weight
and xlarge-bold-line-height
, and stores them inside otkit-typography-desktop
token..xlarge-bold
, which serves as a 1:1 model / engineering translation of the design decision.Let's expand bullet point number 4 from above.
TL;DR: No more repeating the same CSS declarations - font sizes, font weights, line heights, even class compositions - over and over again!
To use it, simply install:
npm i --save-dev @ot-react-ui/typography-desktop
Then depends on your choice of CSS technologies, there are many ways to consume this package:
.some-component-class {
composes: xlarge-bold from '@ot-react-ui/typography-desktop';
}
@import '@ot-react-ui/typography-desktop';
.some-component-class {
@extend: .xlarge-bold; // or you can just use the class names directly
}
If your project uses vanilla CSS you can simply import it in your bundle then use the class names directly.
This package requires node 8. Other node versions may throw errors when you run scripts.
This package requires npm 5, if you'd like to publish. We are using features that's only available after npm 4.
npm i
Before you publish, please make sure your .npmrc
is pointing to the OpenTable private registry with correct credentials.
Please also make sure you have already installed all dependencies for this package and have the correct node / npm versions.
This package should only be published by running:
npm run update-publish
Please contact Vincent Zhang and Lin Xu if you have any questions regarding this package.
FAQs
OT typography groupings for desktop web
The npm package karuto-typography-temp receives a total of 6 weekly downloads. As such, karuto-typography-temp popularity was classified as not popular.
We found that karuto-typography-temp demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.