Giter Club home page Giter Club logo

freecodecamp-balance-sheet's Introduction

Using tables

Using separate tables will help screen readers understand the document flow.

A particular element to be hidden from screen readers, you need to use the aria-hidden attribute and set it to true aria-hidden="true"

Elements used

caption

thead tbody (The thead and tbody elements are used to indicate which portion of your table is the header, and which portion contains the primary data or content.)

tr is used to indicate a table row. td indicates a data cell. th indicates a header cell.

The CSS clip property is used to define the visible portions of an element. The clip-path property determines the shape the clip property should take. Set both the clip-path and -webkit-clip-path properties to the value of inset(50%), forming the clip-path into a rectangle within the element.

overflow: hidden; white-space: nowrap; Prevent text from overflowing.

The calc() function is a CSS function that allows you to calculate a value based on other values. For example, you can use it to calculate the width of the viewport minus the margin of an element:

.example { margin: 10px; width: calc(100% - 20px); }

border-collapse property to collapse, which will allow cell borders to collapse into a single border, instead of a border around each cell.

Now let´s talk bout´ Selectors

*The element/class/id[class~="xyz"] selector will select only any element/class/id whose class includes xyz. 

    ex:  
        The span[class~="sr-only"] selector will select any span element whose class includes sr-only. 

*The :first-of-type pseudo-selector is used to target the first element that matches the selector.

*The :last-of-type pseudo-selector does the exact opposite - it targets the last element that matches the selector.

*The span[class] syntax will target any span element that has a class attribute set, regardless of the attribute's value.

*The :not() pseudo-selector is used to target all elements that do not match the selector

        ex:
        in this case, any of your span elements that do not have the sr-only class. This ensures that your earlier rules for the span[class~="sr-only"] selector are not overwritten.

        span:not(.sr-only) {
        font-weight: normal;
        }

*The [attribute="value"] selector targets any element that has an attribute with a specific value.

        ex: 
            tr[class="total"] selector to target specifically your tr elements with the total class

*The :nth-of-type() pseudo-selector is used to target specific elements based on their order among siblings of the same type.

        ex: 
            tr.total td:nth-of-type(3) {
                padding-right: 0.5rem;
            }

*last-of-type
*first-of-type

freecodecamp-balance-sheet's People

Contributors

lacaelihermosa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.