
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
tailwindcss-semantic-typography
Advanced tools
This plug-in provides out-of-the-box typography settings based on semantic HTML tags for tailwindcss. See below in what ways it differs from the official typography plug-in.
NOTE: this plug-in is in an early alpha stage, but still useful and usable.
Install it from npm:
# Using npm
npm install -D tailwindcss-semantic-typography
# Using Yarn
yarn add tailwindcss-semantic-typography
Add it to your tailwindcss setup. For the time being, there are no means to configure the plug-in. Before 1.0 there will be an option to choose the type of font pairing or font setup you would like to use. Currently only a serif / sans scheme is supported.
// tailwind.config.js
module.exports = {
theme: {
// ...
},
plugins: [
require('tailwindcss-semantic-typography'),
// ...
],
};
Quite simple: use semantic tags correctly. Do not abuse semantic tags in the
navigational parts of your layouts. Put the content where you want typography
to be styled into an article
tag and everything else outside.
You might want to use the
structural example in the HTML5 specification
as a starting point.
If you want to generate readable line-lengths (65 characters), and some nice
default styling for lists (ol
and ul
) put your content
inside of an article
tag.
For the time being: choose your serif (headlines) and sans (body text) font pairing wisely.
That's all.
The official typography plug-in is built with a focus on content that is not known at build time (like content from a database or from remote sources). For this reason it installs as a full-fledged component and generates some overhead in the production CSS. Apart from that, it sticks with the "utility first" approach that tailwindcss propagates.
This plug-in is meant to combine the "utility first" approach with a global default for typography that builds on the semantic structure of HTML5. The presumption is that you use this plug-in in scenarios where you have full control over the content at build time, like you have with most modern static site builders like hugo.
On the one hand this allows for full-fledged optimization (you only have in production what you really need). On the other hand it enforces globally consistent typography for markup generated content (something you almost always want).
The settings are in line with the official typography plug-in, however you have to cater for colour elsewhere.
This plug-in builds on the following assumptions:
main
section that is present on every rendered pagesection
and article
tagsarticle
h1
, h2
,..., p
, pre
, code
,
in the navigational sections of your designFAQs
Bring semantic typography to tailwindcss
The npm package tailwindcss-semantic-typography receives a total of 0 weekly downloads. As such, tailwindcss-semantic-typography popularity was classified as not popular.
We found that tailwindcss-semantic-typography 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.