Skip to content

Commit

Permalink
Updated CSS rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 8, 2024
1 parent 6cad505 commit 558d48d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
6 changes: 4 additions & 2 deletions docs/technology/frontend/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
1. Styling CSS with Prettier SHOULD NOT use any custom options ([Prettier's philosophy on options](https://prettier.io/docs/en/option-philosophy))
1. CSS MUST be linted with [Stylelint](#stylelint)
1. Stylelint MUST use the `stylelint-selector-bem-pattern` plugin
1. Stylelint COULD use the `stylelint-order` plugin
1. Stylelint COULD extend the [TNA Frontend stylelint configuration](https://github.com/nationalarchives/tna-frontend/blob/main/stylelint.config.js)
1. Stylelint COULD be configured to ignore some rules
1. **Style content**
1. CSS colours MUST be defined as either hex values or `rgb`
1. CSS colours defined using `rgb` SHOULD use the newer syntax (`rgb(255 128 0)` rather than `rgb(255, 128, 0)`)
1. CSS colours with alpha MUST use the newer `rgb` syntax (e.g. `rgb(255 128 0/0.5)`)
1. CSS MUST work without support for [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties)
1. CSS colours with alpha SHOULD use the newer `rgb` syntax (e.g. `rgb(255 128 0/0.5)`)
1. CSS SHOULD work without support for [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties)
1. CSS variables COULD be used to enhance customisability
1. **Media**
1. If we expect the web content to be printed or saved to a PDF, CSS print styles SHOULD be considered
Expand Down
15 changes: 6 additions & 9 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ nav:
- Technical Governance Board: organisation/technical-governance-board.md
- Technology:
- technology/index.md
- Frontend:
- HTML: technology/frontend/html.md
- JavaScript: technology/frontend/javascript.md
- CSS: technology/frontend/css.md
- Backend:
- Python: technology/backend/python.md
- Scala: technology/backend/scala.md
- Database:
- Postgres: technology/database/postgres.md
- HTML: technology/frontend/html.md
- JavaScript: technology/frontend/javascript.md
- CSS: technology/frontend/css.md
- Python: technology/backend/python.md
# - Scala: technology/backend/scala.md
- Postgres: technology/database/postgres.md
- Infrastructure:
- Amazon Web Services (AWS): technology/infrastructure/aws.md
- Containers: technology/infrastructure/containers.md
Expand Down

0 comments on commit 558d48d

Please sign in to comment.