Based on the Frontend Mentor Job listings with filtering challenge.
As I couldn't make sense of the JavaScript requirements of the project (from neither the written brief nor the designs) I decided to concentrate on the CSS...
gridis used for the overall page layout as well as for the job listul.flexis used throughout.- Responsive (including the use of
font-size: clamp(...)for responsive text). :has()operator is used for the first time to select the parent of any listing that contains the 'featured' tab.- CSS Nesting is used to group styles. This wreaks havoc on the Chrome Inspector -- No doubt this will soon be fixed. (Also, see Limited Browser Support, below).
An HTML template is used to output the individual jobs.
- ES6 modules
- ES6 (no transpilation to ES5)
- All items are navigable via the keyboard.
- There is a 'skip to main content' link at the top of the page. This becomes visible when using keyboard navigation.
ARIAandroleattributes are used where required.- Descriptive labels for each detail of a job listing are visually hidden (but available to screen readers).
- Tested on:
- Windows 10
- Chrome
- Microsoft Edge
- Firefox (fails)
- Windows 10
As of 26th July 2023, and according to caniuse.com/css-has and /caniuse.com/?search=CSS%20nesting neither the :has() operator nor CSS Nesting works with Firefox (although both do with Safari on Mac. However, I haven't tested the latter).
- The individual job listings are pulled in via a
.jsonfile. - A dark mode theme switcher is included.