New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bbc/psammead-styles

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbc/psammead-styles - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

dist/font-families.js

2

CHANGELOG.md
# @bbc/psammead-styles Changelog
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 0.5.0 | [PR#573](https://github.com/bbc/psammead/pull/573) Add functions to get font styles for different services |
| 0.4.1 | [PR#547](https://github.com/bbc/psammead/pull/547) Create story for gel-foundations typographies |

@@ -6,0 +8,0 @@ | 0.4.0 | [PR#548](https://github.com/bbc/psammead/pull/548) Bump the reith font version from 2.302 to 2.511 |

2

package.json
{
"name": "@bbc/psammead-styles",
"version": "0.4.1",
"version": "0.5.0",
"description": "A collection of string constants for use in CSS, containing non-GEL styling details that are bespoke to specific BBC services and products.",

@@ -5,0 +5,0 @@ "repository": {

@@ -10,2 +10,4 @@ # psammead-styles - [![Known Vulnerabilities](https://snyk.io/test/github/bbc/psammead/badge.svg?targetFile=packages%2Futilities%2Fpsammead-styles%2Fpackage.json)](https://snyk.io/test/github/bbc/psammead?targetFile=packages%2Futilities%2Fpsammead-styles%2Fpackage.json) [![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/bbc/psammead/blob/latest/LICENSE) [![npm version](https://img.shields.io/npm/v/@bbc/psammead-styles.svg)](https://www.npmjs.com/package/@bbc/psammead-styles) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/bbc/psammead/blob/latest/CONTRIBUTING.md)

`/font-styles` provides functions that can be used to get font-styles for different services. If a font-style is not available all the functions will fallback to regular sans font-style of the service.
## Installation

@@ -19,2 +21,3 @@

<!-- prettier-ignore -->
```jsx

@@ -51,2 +54,17 @@ import { C_POSTBOX } from '@bbc/psammead-styles/colours';

### font-styles
In case you are using embeded fonts, you need to make sure you have loaded your fonts first before using the functions. If the embeded font is not loaded, the fallback font will be applied
```js
import { getSansRegular } from '@bbc/psammead-styles/font-styles';
const fontStyle = getSansRegular('news');
const SomeStyledComponent = css`
${fontStyle};
/* more css styles */
`;
```
## Contributing

@@ -53,0 +71,0 @@

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