
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@texastribune/ds-toolbox-assets
Advanced tools
CSS framework and icon assets for The Texas Tribune
SCSS framework and icon library
yarn add @texastribune/ds-toolbox-assets
npm install @texastribune/ds-toolbox-assets
In your scss file, you can mix and match if you only need certain helpers.
Example
@import "@texastribune/ds-toolbox-assets/scss/1-settings/all";
@import "@texastribune/ds-toolbox-assets/scss/5-typography/t-size";
@import "@texastribune/ds-toolbox-assets/scss/6-components/icon/icon";
Or you can take the whole base if you're styling a page with no outside CSS expected.
Example
@import '@texastribune/ds-toolbox-assets/scss/base-v2';
How to document a new CSS class
We use a comment parser along with some extra logic to generate our docs. To add a new section of documentation, add a boilerplate above your CSS rules like the one below:
// Title of Section (root-class-name)
//
// Description {{isWide}} {{isHelper}}
//
// root-class-name-modifier - desc
//
// Markup: 6-components/test/test.html
//
// Styleguide 6.0.1
//
.root-class-name {
}
{{isWide}}
is used to display the demo of each modifier at full width{{isHelper}}
is used to hide main demo and only display modifiers// Deprecated
is used to signify a class to be removed. See Deprecating a CSS class for details.We organize our SCSS files with the inverted triangle approach in mind. We put our own spin on it by adding a typography
and layouts
folder, but the general idea is all the same; increased specificity as you move down the stylesheet.
We closely follow the BEM (Block Element Modifier) class naming convention in our components
folder, but we break BEM rules in other places. This is a deliberate attempt to create a hybrid approach of using BEM when scoped to a component and helper classes when styling globally in a more ad hoc context.
Use namespacing for quick reference of the function of a CSS class. The following key can be used a guideline for naming your class:
Components
.c-component-name[__<element>|--<-modifier>] {}
Example: c-button
Typography
.t-type-util {}
Example: t-headline
Layout
.l-layout-util {}
Example: l-container
Utilities
.[is|has]-state {}
Example: has-bg-yellow
This toolbox is a living system and we use it to keep a vigilant eye on how we're using CSS throughout our various products. As an outcome, there are times we will need to deprecate naming conventions, class names, and approaches within our system.
We denote any class not to be used moving forward in our commenting boilerplate with the following syntax:
// Title of Section (root-class-name)
//
// Deprecated: Description of old usage and why it's being removed
//
// ...
As we phase out classes, we must be mindful of where those classes are relied upon in our various repos and ultimately our public-facing products.
Steps for removing a class:
Add the deprecation notice to the comment. // Deprecated: This class was used for x, but were phasing it out for y because...
Note where the classes appear according to the docs. (You should see a repo name and count signifying potential HTML usages in the docs interface.)
Push your changes to a branch in this repo.
Publish a new version to npm.
In the repo where this is used, yarn add @texastribune/ds-toolbox-assets@0.0.?
to import your toolbox changes.
Compile the assets in the outside repo.
Preview the page using the HTML with the classes you altered. Does it break a style? Does it reference a class no longer attached to any CSS? Update the HTML accordingly.
Once everything is looking stable, merge your branch in this repo with master.
FAQs
CSS framework and icon assets for The Texas Tribune
We found that @texastribune/ds-toolbox-assets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
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.