Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@bbc/gel-foundations
Advanced tools
A range of string constants for use in CSS, intended to help implement BBC GEL-compliant webpages and components.
This package provides a range of string constants for use in CSS, intended to help implement BBC GEL-compliant webpages and components.
/breakpoints
- GEL breakpoints, as well as typography breakpoints. These use the GEL grid sizes which can be found in the GEL Grid guidelines.
/spacings
- GEL spacings and GEL Grid margins and gutters. These use the GEL grid spacing sizes which can be found in the GEL Grid guidelines.
/typography
- GEL type sizes and font stacks. These are based on the GEL Typography definitions which can be found in the GEL guidelines. More details on how the type sizes were implemented for this package are available here.
npm install @bbc/gel-foundations --save
import { GEL_GROUP_3_SCREEN_WIDTH_MIN } from '@bbc/gel-foundations/breakpoints';
import { GEL_GUTTER_ABOVE_600PX } from '@bbc/gel-foundations/spacings';
import { getLongPrimer } from '@bbc/gel-foundations/typography';
These values can then be used directly within CSS declarations in code:
import { css } from 'styled-components';
const SomeStyledComponent = css`
font-family: ${GEL_FF_REITH_SANS};
${getLongPrimer(script)};
@media (min-width: ${GEL_GROUP_3_SCREEN_WIDTH_MIN}) {
grid-gap: ${GEL_GUTTER_ABOVE_600PX};
}
`;
To allow the typography to be fully accessible and responsive, please note that you should apply a default font-size to the document root (e.g. html { font-size: 100% }
).
Our typography uses rem
for font-size and line-height. The rem
unit represents a size relative to the document root, so we use that for font-size, line-height and spacing for a consistent look-and-feel across the document. You can read our detailed analysis of "REMs vs EMs for spacing" for more information.
The utility typography function (e.g. getLongPrimer('arabic')
) receives a script argument which is an object with the different script GEL Types Sizes and returns the font-sizes
and line-heights
for the specific GEL Type (e.g. Long Premier
).
You can import the script doing import { arabic } from '@bbc/gel-foundations/scripts
. By default you should import the latin
script as found on the GEL typography guidelines.
In addition to Latin script defaults, Psammead supports typography for a number of other scripts. We have grouped the scripts that share similiar features as follows:
Group Name | Services | Rationale |
---|---|---|
latin-and-cyrillic | News, Hausa, Gahuza, Somali, Swahili, Igbo, Pidgin, Afaan Oromo, Yoruba, Azeri, Indonesia, Uzbek, Serbian, Russian, Ukrainian, Kyrgyz, Uzbek | The typography values for Latin and Cyrillic characters are identical |
latin-with-diacritics | Vietnamese, Mundo, Afrique, Brasil, Turkish | The diacritics make these values differ from Latin |
arabic | Arabic, Pashto, Persian, Urdu | Group as they use the Arabic alphabet |
no-ascenders-or-descenders | Korean, Japanese, Zhongwen, Ukchina, Tigrinya, Amharic | Group all alphabets without ascenders or descenders. This could be implemented as chinese, korean, ethiopic |
devanagari-and-gurmukhi | Hindi, Nepali, Gujarati, Punjabi, Marathi, Telugu | The typography values for Devanagari and Gurmukhi characters are identical |
thai | Thai | Bespoke to the Thai characters |
bengali | Bengali | Bespoke to the Bengal characters |
burmese | Burmese | Bespoke to the Burmese characters |
sinhalese | Sinhala | Bespoke to the Sinhalese characters |
tamil | Tamil | Bespoke to the Tamil characters |
When adding a new export to this utility package the export tests also need to be updated. When removing an exisiting export from this utility package the export tests need to be updated and the package version requires a major change (EG: 1.2.1 -> 2.0.0) as this would be considered a breaking change as functionality is being removed.
Psammead is completely open source. We are grateful for any contributions, whether they be new components, bug fixes or general improvements. Please see our primary contributing guide which can be found at the root of the Psammead respository.
We welcome feedback and help on this work. By participating in this project, you agree to abide by the code of conduct. Please take a moment to read it.
Psammead is Apache 2.0 licensed.
FAQs
A range of string constants for use in CSS, intended to help implement BBC GEL-compliant webpages and components.
The npm package @bbc/gel-foundations receives a total of 52 weekly downloads. As such, @bbc/gel-foundations popularity was classified as not popular.
We found that @bbc/gel-foundations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.