Front End Mentor Practices - Projects and important notes

  1. sunnyside-agency-landing-page-main First FEM challenge, mobile menu, grid
  2. order-summary-component-main Practice css
  3. blog-preview-card-main Background image
  4. 4_N_social-links-profile-main Responsive, css
  5. 5_N_intro-component-with-signup-form-master css, JavaScript, form validations
  6. 6_J_fylo-dark-theme-landing-page-master Reset, css, css components, Landing page
  7. 7_J_social-media-dashboard-with-theme-switcher-master SASS, Dark Theme switcher
7 ways to work with css SASS
  1. Using a < main > tag inside the < body > of your HTML is a best practice because it clearly identifies the main content of your page. This helps with accessibility and improves how search engines understand your content.
  2. Using a full modern CSS reset is beneficial because it removes default browser styling, creating a consistent starting point for your design across all browsers. It helps avoid unexpected layout issues and makes your styles more predictable, ensuring a uniform appearance on different devices and platforms, check out this site for a Full modern reset
  3. While px is useful for precise, fixed sizing, such as border-width, border-radius, inline-padding, and sizes, it has limitations. Pixels don't scale well with user settings or adapt to different devices, which can negatively impact accessibility and responsiveness. For example, using px for font sizes can make text harder to read on some screens, Check this article why font-size must NEVER be in pixels. In contrast, relative units like rem and adjust based on the user’s preferences and device settings, making your design more flexible and accessible. Use px where exact sizing is needed, but prefer relative units for scalable layouts. If you want a deeper explanation watch this video by Kevin Powell CSS em and rem explained. Another great resource I found useful is this px to rem converter based on the default font-size of 16 pixel.
  4. Using position: absolute is not always best practice because it removes elements from the normal document flow, making layouts harder to manage and potentially causing overlap or misalignment on different screen sizes. Instead, use flexible layout techniques like CSS Grid or Flexbox for more responsive and maintainable designs.
  5. For future project, You could download and host your own fonts using @font-face improves website performance by reducing external requests, provides more control over font usage, ensures consistency across browsers, enhances offline availability, and avoids potential issues if third-party font services become unavailable. Place to get .woff2 fonts
  6. These < div > should really have semantic tags like headings (< h1 > to < h6 >) and paragraphs (< p >) convey structure and meaning to content, improving accessibility, SEO, and readability by helping search engines and screen readers interpret the content.
  7. Using rem or em units in @media queries is better than px because they are relative units that adapt to user settings, like their preferred font size. This makes your design more responsive and accessible, ensuring it looks good on different devices and respects user preferences.
  8. Avoid using id selectors for styling in CSS because they are too specific and hard to override, making your styles less flexible and maintainable. Instead, use class selectors (.), which are reusable and more manageable, allowing for better control over your styles and easier updates.
  9. Using font-display: swap in your @font-face rule improves performance by showing fallback text until the custom font loads, preventing a blank screen (flash of invisible text). The downside is a brief flash when the font switches, but it’s usually better than waiting for text to appear.
  10. Line height is usually unitless to scale proportionally with the font size, keeping text readable across different devices. Best practice is to use a unitless value like 1.5 for flexibility. Avoid using fixed units like px or %, as they don't adapt well to changes in font size or layout.
  11. Having a clear and descriptive alt text for images is important because it helps people who use screen readers understand the content, making your site more accessible. It also improves SEO, as search engines use alt text to understand the image's context, helping your site rank better, Check this out Write helpful Alt Text to describe images
  12. This should be in lowercase < h4 class="content__subheading">PERFUME< /h4> and styled in CSS with text-transform: uppercase;, Keeping text lowercase in HTML improves accessibility and SEO. Using text-transform: uppercase; in CSS separates content from style, ensuring screen readers interpret the text correctly.
  13. you may enhance the experience using some attributes like: required and aria-required so not just the form has a native validation status but any assistive technology to be able to correctly mention it; aria-labelledby and aria-describedby so assistive technology would be able to give a better context on the input state when focused or even when the user has an error on it; and an aria-invalid="true" when it has an error state. The span.text-fem-red may have an aria-live="assertive" attribute so the assistive technologies may read out loud any error message.
  14. All interactive elements, like anchors or buttons should provide different states to be universally accessible; those states should at least be rest (default state), hover, focus and active. Check for the requirements in the provided screenshots and try to not let the browser use the focus one to provide a unique experience across devices.
  15. deque university check list

CSS Versions Features

CSS Version Year Feature Description
CSS1 1996 Selectors Basic selectors for elements, classes, and IDs.
CSS1 1996 Text Properties Font settings, text color, decoration, and alignment.
CSS1 1996 Box Model Definition of margins, borders, padding, and content area.
CSS1 1996 Backgrounds Background color and image properties.
CSS1 1996 Lists Basic styling for ordered and unordered lists.
CSS2 1998 Advanced Selectors Attribute selectors, pseudo-classes, and pseudo-elements.
CSS2 1998 Box Model Enhancements Detailed box model with margin collapsing behavior.
CSS2 1998 Positioning Absolute, fixed, and relative positioning methods.
CSS2 1998 Media Types Support for media types and media queries.
CSS2 1998 Table Styling Enhanced control over table layout and styling.
CSS3 1999 (partial) Modularization Separation of CSS features into modules for easier updates.
CSS3 2011 Flexbox A flexible box layout model for responsive design.
CSS3 2011 Grid Layout A two-dimensional grid layout system for complex designs.
CSS3 2011 Transitions and Animations Support for smooth transitions and keyframe animations.
CSS3 2011 Media Queries Enhanced support for responsive design based on device characteristics.