Reprence Html CSS javascript PHP MySQL Bootsrap

Reboot

Reboot, a collection of element-specific CSS changes in a single file, kickstart Bootstrap to provide an elegant, consistent, and simple baseline to build upon.

CSS variables

With v5.1.1, we standardized our required @imports across all our CSS bundles (including bootstrap.css, bootstrap-reboot.css, and bootstrap-grid.css) to include _root.scss. This adds :root level CSS variables to all bundles, regardless of how many of them are used in that bundle. Ultimately Bootstrap 5 will continue to see more CSS variables added over time, in order to provide more real-time customization without the need to always recompile Sass. Our approach is to take our source Sass variables and transform them into CSS variables. That way, even if you don’t use CSS variables, you still have all the power of Sass. This is still in-progress and will take time to fully implement.

For example, consider these :root CSS variables for common styles:

In practice, those variables are then applied in Reboot like so:

Native font stack

Bootstrap utilizes a “native font stack” or “system font stack” for optimum text rendering on every device and OS. These system fonts have been designed specifically with today’s devices in mind, with improved rendering on screens, variable font support, and more. Read more about native font stacks in this Smashing Magazine article.

Note that because the font stack includes emoji fonts, many common symbol/dingbat Unicode characters will be rendered as multicolored pictographs. Their appearance will vary, depending on the style used in the browser/platform’s native emoji font, and they won’t be affected by any CSS color styles. This font-family is applied to the and automatically inherited globally throughout Bootstrap. To switch the global font-family, update $font-family-base and recompile Bootstrap.

Headings

All heading elements—

have their margin-top removed, margin-bottom: .5rem set, and line-height tightened. While headings inherit their color by default, you can also override it via optional CSS variable, --bs-heading-color.

rbt1

All 'p' elements have their margin-top removed and margin-bottom: 1rem set for easy spacing.

Links

Links have a default color and underline applied. While links change on :hover, they don’t change based on whether someone :visited the link. They also receive no special :focus styles.

rbt2

Horizontal rules

The


element has been simplified. Similar to browser defaults,
s are styled via border-top, have a default opacity: .25, and automatically inherit their border-color via color, including when color is set via the parent. They can be modified with text, border, and opacity utilities.

rbt3

Lists

All lists—

    ,
      , and
      —have their margin-top removed and a margin-bottom: 1rem. Nested lists have no margin-bottom. We’ve also reset the padding-left on
        and
          elements.

          rbt4

          For simpler styling, clear hierarchy, and better spacing, description lists have updated margins.

          s reset margin-left to 0 and add margin-bottom: .5rem.
          s are bolded.

          rbt5

          Inline code

          Wrap inline snippets of code with . Be sure to escape HTML angle brackets.

          rbt6

          Code blocks

          Use

          s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper rendering. The 
           element is reset to remove its margin-top and use rem units for its margin-bottom.

          rbt7

          Variables

          For indicating variables use the tag.

          rbt8

          Use the to indicate input that is typically entered via keyboard.

          rbt9

          Sample output

          For indicating sample output from a program use the tag.

          rbt10

          Tables

          Tables are slightly adjusted to style s, collapse borders, and ensure consistent text-align throughout. Additional changes for borders, padding, and more come with the .table class.

          rbt11

          Forms

          Various form elements have been rebooted for simpler base styles. Here are some of the most notable changes:

          s have no borders, padding, or margin so they can be easily used as wrappers for individual inputs or groups of inputs.

          s, like fieldsets, have also been restyled to be displayed as a heading of sorts.

          s,

          Misc elements

          Address

          The

          element is updated to reset the browser default font-style from italic to normal. line-height is also now inherited, and margin-bottom: 1rem has been added.
          s are for presenting contact information for the nearest ancestor (or an entire body of work). Preserve formatting by ending lines with
          .

          rbt16

          Blockquote

          The default margin on blockquotes is 1em 40px, so we reset that to 0 0 1rem for something more consistent with other elements.

          rbt17

          Inline elements

          The element receives basic styling to make it stand out amongst paragraph text.

          rbt18

          Summary

          The default cursor on summary is text, so we reset that to pointer to convey that the element can be interacted with by clicking on it.

          rbt19

          HTML5 [hidden] attribute

          HTML5 adds a new global attribute named [hidden], which is styled as display: none by default. Borrowing an idea from PureCSS, we improve upon this default by making [hidden] { display: none !important; } to help prevent its display from getting accidentally overridden.

          rbt20

          To merely toggle the visibility of an element, meaning its display is not modified and the element can still affect the flow of the document, use the .invisible class instead.