A sample site for testing w3 CSS validator against @thulite/doks-core
- HTML 45.6%
- JavaScript 43.9%
- Dockerfile 9.3%
- SCSS 1.2%
|
|
||
|---|---|---|
| .codesandbox | ||
| .devcontainer | ||
| .vscode | ||
| assets | ||
| config | ||
| content | ||
| layouts | ||
| static | ||
| .gitignore | ||
| .gitpod.yml | ||
| .npmignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc.yaml | ||
| LICENSE | ||
| netlify.toml | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
thulite-css-validation-test
Description
A sample site for testing w3 CSS validator against @thulite/doks-core
Summary
Some SCSS variables are not being replaced during libsass processing and are ending up as text in the CSS.
Test procedure
- Set up a test site
npm create thulite@latest thulite-css-validation-test -- --template dokscd thulite-css-validation-testnpm install- Start the hugo server:
npm run dev - Browse to the CSS
- In your browser 'view-source'
- Click on the 'main.<hash>.css' link.
- OR use your browser developer tools and set to NOT display source.
- Search for $body-bg-dark.
- Observe it is present in the 'live' CSS.
- Cancel the server (Ctrl-C)
- Build the site:
hugo --gc
- Obtain and install W3 Nu Validator
- Download the latest release from
https://github.com/validator/validator/releases
- E.g.
wget https://github.com/validator/validator/releases/download/latest/vnu.jar
- E.g.
- Ensure you have a recent-ish Java JRE (I use openjdk-17-jre from Debian 12 'Bookworm')
- Download the latest release from
https://github.com/validator/validator/releases
- Use the Validator and observe the results
- Execute
java -jar ./vnu.jar --skip-non-css $(find public -name '*.css' | tr $'\n' ' ')
- Execute
- Go to the file and line containing an error like
error: CSS: “color”: Parse Error.- In our case, these are usually unprocessed variables.