Discuss Bootstrap ”; Previous Next Twitter Bootstrap is the most popular front end framework in the recent time. It is sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development. It uses HTML, CSS and Javascript. This tutorial will teach you the basics of Bootstrap Framework using which you can create web projects with ease. The tutorial is divided into sections such as Bootstrap Basic Structure, Bootstrap CSS, Bootstrap Layout Components and Bootstrap Plugins. Each of these sections contain related topics with simple and useful examples. Print Page Previous Next Advertisements ”;
Category: bootstrap
Bootstrap-Dashboard RTL Demo
Bootstrap – Dashboard RTL Demo ”; Previous Next Overview RTL stands for “Right-to-Left,” and it refers to a writing direction. Some of the languages include Arabic, Hebrew, Persian, and Urdu. In RTL writing systems, text and content are read from right to left, opposite to the usual left-to-right direction used in languages like English. Refer the page RTL, to know more about it. We can create simple admin dashboard shell with a sidebar and navbar that are fixed using Bootstrap. This can be used in RTL direction. Some of the bootstrap elements are shown below in the example− Example Description Download link Dashborad This example shows the dashboard in the RTL direction. Download Print Page Previous Next Advertisements ”;
Bootstrap – RTL
Bootstrap – RTL ”; Previous Next This chapter discusses about RTL (right to left) support provided by Bootstrap. The RTL feature supports for right-to-left text across your layout, components and utilities. Requirements To enable RTL in pages powered by Bootstrap, you must fulfill the two requirements. They are as follows: On <html> element, set dir-“rtl”. On <html> element, add an appropriate lang attribute, such as lang=”ar”. You need to include the RTL version of CSS. For example, here is a stylesheet with RTL enabled: <link rel=”stylesheet” href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css” integrity=”sha384-PJsj/BTMqILvmcej7ulplguok8ag4xFTPryRq8xevL7eBYSmpXKcbNVuy+P0RMgq” crossorigin=”anonymous”> Starter template Following is a sample of starter template meeting the requirements for enabling RTL: Example You can edit and try running this code using the Edit & Run option. <!DOCTYPE html> <html lang=”ar” dir=”rtl”> <head> <!– Required meta tags –> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <!– Bootstrap CSS –> <link rel=”stylesheet” href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css” integrity=”sha384-PJsj/BTMqILvmcej7ulplguok8ag4xFTPryRq8xevL7eBYSmpXKcbNVuy+P0RMgq” crossorigin=”anonymous”> <!–“Welcome to Tutorialspoint” written in arabic–> <title>مرحبًا بك في Tutorialspoint</title> </head> <body> <!–“Welcome to Tutorialspoint” written in arabic–> <h1>مرحبًا بك في Tutorialspoint</h1> <!– Optional JavaScript; choose one of the two! –> <!– Option 1: Bootstrap Bundle with Popper –> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js” integrity=”sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz” crossorigin=”anonymous”></script> <!– Option 2: Separate Popper and Bootstrap JS –> <!– <script src=”https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js” integrity=”sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r” crossorigin=”anonymous”></script> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js” integrity=”sha384-fbbOQedDUMZZ5KreZpsbe1LCZPVmfTnH7ois6mU1QK+m14rQ1l2bGBq41eYeM/fS” crossorigin=”anonymous”></script> –> </body> </html> Customize from source Use the variables, maps and mixins, for customization purposes. The approach works exactly like LTR, for RTL. Custom RTL values There are certain directives for RTL CSS values, via which you can set the output of a variable different for RTL. For an example, in order to decrease the font weight throughout your codebase, you can use the syntax as /*rtl: {value}*/. $font-weight-bold: 600 #{/* rtl:500 */} !default; This would output to the following for default CSS and RTL CSS: /* bootstrap.css */ dt { font-weight: 600 /* rtl:500 */; } /* bootstrap.rtl.css */ dt { font-weight: 500; } Alternative font stack You should be aware that not all the non-Latin alphabets are supported. Hence in order to switch from Pan-European to Arabic family of fonts, you may need to use /*rtl:insert: {value}*/ in your font stack to alter the names of font families. To switch from Helvetica Neue font for LTR to Helvetica Neue Arabic for RTL, your Sass code could look like this: $font-family-sans-serif: Helvetica Neue #{“/* rtl:insert:Arabic */”}, // Cross-platform generic font family (default user interface font) system-ui, // Safari for macOS and iOS (San Francisco) -apple-system, // Chrome RTL and LTR at the same time Do you want to use LTR and RTL together? Its very much possible, you just need to wrap your @imports with a class, and set a custom rename rule for RTLCSS: /* rtl:begin:options: { “autoRename”: true, “stringMap”:[ { “name”: “ltr-rtl”, “priority”: 100, “search”: [“ltr”], “replace”: [“rtl”], “options”: { “scope”: “*”, “ignoreCase”: false } } ] } */ .ltr { @import “../node_modules/bootstrap/scss/bootstrap”; } /*rtl:end:options*/ Each selector in your CSS files will have the prefix .ltr (or .rtl for RTL files) after executing Sass and RTLCSS. Now that both files can be used on the same page, you can use either the .ltr or .rtl component wrapper extension to specify which direction to utilise. While working with LTR and RTL implementation together, you need to consider the following points: Make sure to add dir and lang attributes accordingly, when switching .ltr and .rtl Try to do some customization and load one of the two files (ltr & rtl) asynchronously, as loading of both the files can cause performance issues. Nesting styles will prevent the form-validation-state() mixin and it may not work as intended. The Breadcrumb case The only case that requires its own brand-new variable is the breadcrumb separator, namely $breadcrumb-divider-flipped, defaulting to $breadcrumb-divider. Print Page Previous Next Advertisements ”;
Bootstrap – Containers
Bootstrap – Containers ”; Previous Next This chapter will discuss about Bootstrap containers. Containers are used to pad content within them. Containers are required for default grid system (Grid system uses a series of containers, rows and columns to align content). Containers are used to contain, pad, and center the content within them. Containers can also be nested, though most layouts don”t require a nested container. There are three different container classes in Bootstrap: .container (sets responsive max-widths). .container-{breakpoint} (width: 100% until specified breakpoint). .container-fluid (width: 100% at all breakpoints). How the max-width of the container (when compared to original .container and .container-fluid) varies across each breakpoint is shown in the below table: Examples of the same can be seen in chapter Grid Demo Extra small <576px Small ≥576px Medium ≥768px Large ≥992px X-Large ≥1200px XX-Large ≥1400px .container 100% 540px 720px 960px 1140px 1320px .container-sm 100% 540px 720px 960px 1140px 1320px .container-md 100% 100% 720px 960px 1140px 1320px .container-lg 100% 100% 100% 960px 1140px 1320px .container-xl 100% 100% 100% 100% 1140px 1320px .container-xxl 100% 100% 100% 100% 100% 1320px .container-fluid 100% 100% 100% 100% 100% 100% Default Containers Use .container class which creates a responsive fixed-width container. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Container</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container mt-4″> <div class=”bg-light”> <h2 class=”text-success text-center”>Tutorialspoints</h2> <h5 class=”text-primary text-center”>Bootstrap – Container</h5> <p>Container is used to set the margin of the content. It contains row elements and the row elements are containers of columns. This is known as the grid system. Container is used to set the margin of the content. It contains row elements and the row elements are containers of columns.</p> </div> </div> </body> </html> Responsive Containers Use responsive containers to declare a class that is 100% wide until the specific breakpoint is reached, after that use max-widths for all subsequent breakpoints. Use the .container-sm|md|lg|xl classes to decide whether the container should be responsive or not. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Container</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container-sm text-success border mt-2″>Tutorialspoints breakpoint-sm</div> <div class=”container-md text-success border mt-2″>Tutorialspoints breakpoint-md</div> <div class=”container-lg text-success border mt-2″>Tutorialspoints breakpoint-lg</div> <div class=”container-xl text-success border mt-2″>Tutorialspoints breakpoint-xl</div> <div class=”container-xxl text-success border mt-2″>Tutorialspoints breakpoint-xxl</div> </body> </html> Fluid Containers Use the .container-fluid class to create a full width container. They span the entire width of the screen. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Container</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container-fluid”> <h2 class=”text-success text-center”>Tutorialspoints</h2> <h5 class=”text-primary text-center”>Bootstrap – Container</h5> <p>Container is used to set the margin of the content. It contains row elements and the row elements are containers of columns. This is known as the grid system. Container is used to set the margin of the content. It contains row elements and the row elements are containers of columns.</p> </div> </body> </html> Print Page Previous Next Advertisements ”;
Bootstrap – Gutters
Bootstrap – Gutters ”; Previous Next This chapter will discuss about Bootstrap gutters. Gutter provides padding between your columns. Gutters are used to responsively space and align content. How it works Gutters are generated by horizontal padding, and are spaces between the column content. Align the content using padding-right and padding-left on each column. Gutters begin at a width of 1.5 rem (24px), hence allows us to align grid to the scale of padding and margin spacers. Adjust gutters with breakpoint-specific classes to change horizontal, vertical, and all other gutters. Horizontal gutters .gx-* classes manage the widths of horizontal gutters, and if larger gutters are used, the parent .container or .container-fluid may require adjustment to prevent overflow. This can be done using a padding utility, such as .px-4 as demonstarted in below example. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Gutters</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container px-4 text-center mt-2″> <div class=”row gx-5″> <div class=”col”> <div class=”p-2 bg-info”>First Column</div> </div> <div class=”col”> <div class=”p-2 bg-warning”>Second Column</div> </div> </div> </div> </body> </html> Using overflow functionality Adding a wrapper with the .overflow-hidden class to .row is another option. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Gutters</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container overflow-hidden text-center”> <div class=”row gx-5 mt-2″> <div class=”col”> <div class=”p-2 bg-info”>First Column</div> </div> <div class=”col”> <div class=”p-2 bg-warning”>Second Column</div> </div> </div> </div> </body> </html> Vertical gutters The vertical gutter is used for responsive spacing, padding between columns, and aligning content with the grid. Use .gy-* classes to control vertical gutter widths in a row when column wrapping occurs. They can cause some overflow below the .row at the end of a page, like the horizontal gutters. To fix this, add a wrapper with .overflow-hidden class around a .row. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Gutters</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container overflow-hidden text-center mt-2″> <div class=”row gy-5″> <div class=”col-6″> <div class=”p-2 bg-info”>First Column</div> </div> <div class=”col-6″> <div class=”p-2 bg-warning”>Second Column</div> </div> <div class=”col-6″> <div class=”p-2 bg-info”>Third Column</div> </div> <div class=”col-6″> <div class=”p-2 bg-warning”>Fourth Column</div> </div> </div> </div> </body> </html> Horizontal and vertical gutters To control the horizontal and vertical grid gutters, use .g-* classes. Use smaller gutter width. So, we won”t need of .overflow-hidden wrapper class. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Gutters</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container text-center”> <div class=”row g-2 mt-2″> <div class=”col-6″> <div class=”p-2 bg-info”>First Column</div> </div> <div class=”col-6″> <div class=”p-2 bg-warning”>Second Column</div> </div> <div class=”col-6 “> <div class=”p-2 bg-info”>Third Column</div> </div> <div class=”col-6″> <div class=”p-2 bg-warning”>Fourth Column</div> </div> </div> </div> </body> </html> Row columns gutters Gutter classes can be added to row columns with responsive design. Responsive row columns and responsive gutter classes are used in the example below: Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Gutters</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”container text-center”> <div class=”row row-cols-2 row-cols-lg-3 g-2 g-lg-3 mt-2″> <div class=”col”> <div class=”p-3 bg-info”>First Row column</div> </div> <div class=”col”> <div class=”p-3 bg-warning”>Second Row column</div> </div> <div class=”col”> <div class=”p-3 bg-info”>Third Row column</div> </div> <div class=”col”> <div class=”p-3 bg-warning”>Fourth Row column</div> </div> <div class=”col”> <div class=”p-3 bg-info”>Fifth Row column</div> </div> <div class=”col”> <div class=”p-3 bg-warning”>Sixth Row column</div> </div> </div> </div> </body> </html> No gutters Remove gutters between columns with .g-0 in grid classes. This removes negative margins from .row and horizontal padding from immediate children columns. Remove the parent .container or .container-fluid to create an edge-to-edge design and add .mx-0 to the .row to prevent overflow. No gutters eliminates margin and padding for both row and columns. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Gutters</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”row g-0 text-center mt-2″> <div class=”col-sm-4 col-md-6 p-2 bg-info”>First Column</div> <div class=”col-4 col-md-3 p-2 bg-warning”>Second Column</div> </div> </body> </html> Print Page Previous Next Advertisements ”;
Bootstrap – CSS Variables
Bootstrap – CSS variables ”; Previous Next This chapter discusses about all the CSS variables provided by Bootstrap, that help in fast and customized design and development of applications. The compiled CSS of Bootstrap consists of a plethora of CSS custom properties (variables) that allow for instant customization without the need to recompile Sass, wherein commonly used values such as theme colors, breakpoints, and primary font stacks are easily accessible during browser inspection, code sandbox operation, or general prototyping. All the custom variables provided by Bootstrap are prefixed with bs-, so that there is no conflict with any other third-party CSS. Root variables Root variables are the variables that can be accessed from anywhere, Bootstrap’s CSS is loaded. These variables are located in the _root.scss file and also included in the compiled dist files Default variables The CSS variables that are accessible everywhere, irrespective of the color mode, are the default variables. :root, [data-bs-theme=light] { –bs-blue: #0d6efd; –bs-indigo: #6610f2; –bs-purple: #6f42c1; –bs-pink: #d63384; –bs-red: #dc3545; –bs-orange: #fd7e14; –bs-yellow: #ffc107; –bs-green: #198754; –bs-teal: #20c997; –bs-cyan: #0dcaf0; –bs-black: #000; –bs-white: #fff; –bs-gray: #6c757d; –bs-gray-dark: #343a40; –bs-gray-100: #f8f9fa; –bs-gray-200: #e9ecef; –bs-gray-300: #dee2e6; –bs-gray-400: #ced4da; –bs-gray-500: #adb5bd; –bs-gray-600: #6c757d; –bs-gray-700: #495057; –bs-gray-800: #343a40; –bs-gray-900: #212529; –bs-primary: #0d6efd; –bs-secondary: #6c757d; –bs-success: #198754; –bs-info: #0dcaf0; –bs-warning: #ffc107; –bs-danger: #dc3545; –bs-light: #f8f9fa; –bs-dark: #212529; –bs-primary-rgb: 13, 110, 253; –bs-secondary-rgb: 108, 117, 125; –bs-success-rgb: 25, 135, 84; –bs-info-rgb: 13, 202, 240; –bs-warning-rgb: 255, 193, 7; –bs-danger-rgb: 220, 53, 69; –bs-light-rgb: 248, 249, 250; –bs-dark-rgb: 33, 37, 41; –bs-primary-text-emphasis: #052c65; –bs-secondary-text-emphasis: #2b2f32; –bs-success-text-emphasis: #0a3622; –bs-info-text-emphasis: #055160; –bs-warning-text-emphasis: #664d03; –bs-danger-text-emphasis: #58151c; –bs-light-text-emphasis: #495057; –bs-dark-text-emphasis: #495057; –bs-primary-bg-subtle: #cfe2ff; –bs-secondary-bg-subtle: #e2e3e5; –bs-success-bg-subtle: #d1e7dd; –bs-info-bg-subtle: #cff4fc; –bs-warning-bg-subtle: #fff3cd; –bs-danger-bg-subtle: #f8d7da; –bs-light-bg-subtle: #fcfcfd; –bs-dark-bg-subtle: #ced4da; –bs-primary-border-subtle: #9ec5fe; –bs-secondary-border-subtle: #c4c8cb; –bs-success-border-subtle: #a3cfbb; –bs-info-border-subtle: #9eeaf9; –bs-warning-border-subtle: #ffe69c; –bs-danger-border-subtle: #f1aeb5; –bs-light-border-subtle: #e9ecef; –bs-dark-border-subtle: #adb5bd; –bs-white-rgb: 255, 255, 255; –bs-black-rgb: 0, 0, 0; –bs-font-sans-serif: system-ui, -apple-system, “Segoe UI”, Roboto, “Helvetica Neue”, “Noto Sans”, “Liberation Sans”, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”, “Noto Color Emoji”; –bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, “Liberation Mono”, “Courier New”, monospace; –bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); –bs-body-font-family: var(–bs-font-sans-serif); –bs-body-font-size: 1rem; –bs-body-font-weight: 400; –bs-body-line-height: 1.5; –bs-body-color: #212529; –bs-body-color-rgb: 33, 37, 41; –bs-body-bg: #fff; –bs-body-bg-rgb: 255, 255, 255; –bs-emphasis-color: #000; –bs-emphasis-color-rgb: 0, 0, 0; –bs-secondary-color: rgba(33, 37, 41, 0.75); –bs-secondary-color-rgb: 33, 37, 41; –bs-secondary-bg: #e9ecef; –bs-secondary-bg-rgb: 233, 236, 239; –bs-tertiary-color: rgba(33, 37, 41, 0.5); –bs-tertiary-color-rgb: 33, 37, 41; –bs-tertiary-bg: #f8f9fa; –bs-tertiary-bg-rgb: 248, 249, 250; –bs-heading-color: inherit; –bs-link-color: #0d6efd; –bs-link-color-rgb: 13, 110, 253; –bs-link-decoration: underline; –bs-link-hover-color: #0a58ca; –bs-link-hover-color-rgb: 10, 88, 202; –bs-code-color: #d63384; –bs-highlight-bg: #fff3cd; –bs-border-width: 1px; –bs-border-style: solid; –bs-border-color: #dee2e6; –bs-border-color-translucent: rgba(0, 0, 0, 0.175); –bs-border-radius: 0.375rem; –bs-border-radius-sm: 0.25rem; –bs-border-radius-lg: 0.5rem; –bs-border-radius-xl: 1rem; –bs-border-radius-xxl: 2rem; –bs-border-radius-2xl: var(–bs-border-radius-xxl); –bs-border-radius-pill: 50rem; –bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); –bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); –bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175); –bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075); –bs-focus-ring-width: 0.25rem; –bs-focus-ring-opacity: 0.25; –bs-focus-ring-color: rgba(13, 110, 253, 0.25); –bs-form-valid-color: #198754; –bs-form-valid-border-color: #198754; –bs-form-invalid-color: #dc3545; –bs-form-invalid-border-color: #dc3545; } Dark mode variables Following variables are limited to the built-in dark mode of Bootstrap: [data-bs-theme=dark] { color-scheme: dark; –bs-body-color: #adb5bd; –bs-body-color-rgb: 173, 181, 189; –bs-body-bg: #212529; –bs-body-bg-rgb: 33, 37, 41; –bs-emphasis-color: #fff; –bs-emphasis-color-rgb: 255, 255, 255; –bs-secondary-color: rgba(173, 181, 189, 0.75); –bs-secondary-color-rgb: 173, 181, 189; –bs-secondary-bg: #343a40; –bs-secondary-bg-rgb: 52, 58, 64; –bs-tertiary-color: rgba(173, 181, 189, 0.5); –bs-tertiary-color-rgb: 173, 181, 189; –bs-tertiary-bg: #2b3035; –bs-tertiary-bg-rgb: 43, 48, 53; –bs-primary-text-emphasis: #6ea8fe; –bs-secondary-text-emphasis: #a7acb1; –bs-success-text-emphasis: #75b798; –bs-info-text-emphasis: #6edff6; –bs-warning-text-emphasis: #ffda6a; –bs-danger-text-emphasis: #ea868f; –bs-light-text-emphasis: #f8f9fa; –bs-dark-text-emphasis: #dee2e6; –bs-primary-bg-subtle: #031633; –bs-secondary-bg-subtle: #161719; –bs-success-bg-subtle: #051b11; –bs-info-bg-subtle: #032830; –bs-warning-bg-subtle: #332701; –bs-danger-bg-subtle: #2c0b0e; –bs-light-bg-subtle: #343a40; –bs-dark-bg-subtle: #1a1d20; –bs-primary-border-subtle: #084298; –bs-secondary-border-subtle: #41464b; –bs-success-border-subtle: #0f5132; –bs-info-border-subtle: #087990; –bs-warning-border-subtle: #997404; –bs-danger-border-subtle: #842029; –bs-light-border-subtle: #495057; –bs-dark-border-subtle: #343a40; –bs-heading-color: inherit; –bs-link-color: #6ea8fe; –bs-link-hover-color: #8bb9fe; –bs-link-color-rgb: 110, 168, 254; –bs-link-hover-color-rgb: 139, 185, 254; –bs-code-color: #e685b5; –bs-border-color: #495057; –bs-border-color-translucent: rgba(255, 255, 255, 0.15); –bs-form-valid-color: #75b798; –bs-form-valid-border-color: #75b798; –bs-form-invalid-color: #ea868f; –bs-form-invalid-border-color: #ea868f; } Component variables The usage of custom properties as local variables for various components is becoming more prevalent in Bootstrap 5. This results in a reduction of compiled CSS, prevents styles from being inherited in nested tables, and permits some customization and expansion of Bootstrap components following Sass compilation. CSS variables are distinctively used in navbars, grids and many more. When CSS variables are assigned at base component level, it becomes easier to customize and modify it later. Prefix A prefix is used with most of the variables, in order to prevent any collisions with your own codebase. Every CSS variable requires —, apart from the prefix. You can customize the prefix, using the $prefix Sass variable. It is set to bs-, by default. Examples CSS variables provide comparable adaptability to Sass variables; however, there is no requirement for compilation before transmitting to the browser. As an illustration, we utilize CSS variables to reset our page”s font and link styles: body { font: 1rem/1.5 var(–bs-font-monospace); } a { color: var(–bs-red); } Focus variables By employing a blend of Sass and CSS variables, Bootstrap enables the provision of personalized :focus styles that can be selectively appended to singular components and elements. Nevertheless, the overriding of all :focus styles across the board is not currently implemented. Default values can be set in the Sass, that can be customized before compiling. scss/_variables.scss $focus-ring-width: .25rem; $focus-ring-opacity: .25; $focus-ring-color: rgba($primary, $focus-ring-opacity); $focus-ring-blur: 0; $focus-ring-box-shadow: 0 0 $focus-ring-blur $focus-ring-width $focus-ring-color; The variables are subsequently assigned to CSS variables at the :root level, which can be customized in real-time and feature options for x and y offsets, with their default fallback value being 0. scss/_root.scss –#{$prefix}focus-ring-width: #{$focus-ring-width}; –#{$prefix}focus-ring-opacity: #{$focus-ring-opacity}; –#{$prefix}focus-ring-color: #{$focus-ring-color}; Grid breakpoints Grid breakpoints, such as md, lg, xl, xxl are included as CSS
Bootstrap-Blog RTL Demo
Bootstrap – Blog RTL Demo ”; Previous Next Overview RTL stands for “Right-to-Left,” and it refers to a writing direction. Some of the languages include Arabic, Hebrew, Persian, and Urdu. In RTL writing systems, text and content are read from right to left, opposite to the usual left-to-right direction used in languages like English. Refer the page RTL, to know more about it. What is a blog? Blog is a regularly updated website or web page, typically one run by an individual or small group, that is written in an informal or conversational style. Bootstrap provides featured content, a header, and navigation in the blog layout in RTL direction. This is summarized in the following table − Example Description Download link Blog This example indicates about blog in Bootstrap in RTL direction. Download Print Page Previous Next Advertisements ”;
Bootstrap – Useful Resources
Bootstrap – Useful Resources ”; Previous Next The following resources contain additional information on Bootstrap. Please use them to get more in-depth knowledge on this topic. Useful Video Courses Bootstrap Online Training 27 Lectures 2 hours Tutorialspoint More Detail Bootstrap By Building Projects – Includes Bootstrap 4 Featured 162 Lectures 14.5 hours Eduonix Learning Solutions More Detail Master class Bootstrap 5 Course – Responsive Web Design 77 Lectures 6 hours Frahaan Hussain More Detail Bootstrap and jQuery – Training Course for Beginners 86 Lectures 4 hours YouAccel More Detail Learn Bootstrap – For Beginners 45 Lectures 2.5 hours YouAccel More Detail JavaScript, Bootstrap, and PHP – Training for Beginners 117 Lectures 5.5 hours YouAccel More Detail Print Page Previous Next Advertisements ”;
Bootstrap – Starter Template Demo ”; Previous Next What is a starter template? A starter template is a pre-configured set of files, folders, and code that provides a starting point with the basic structure, configuration, and often some common functionalities already implemented. Some key components commonly found in starter templates such as project structure, basic code, dependencies, and more. The provided link shows an example of starter template: Example Description Download link Starter template This example shows a web page that serves as a starter template. Download Print Page Previous Next Advertisements ”;
Bootstrap – Heroes Demo
Bootstrap – Heroes Demo ”; Previous Next What is a heroes? A heroes in Bootstrap is a large, full-width container use to represents images, a title, a brief description, buttons, and more. They make your homepage look better and give clear instructions on what visitors should do next. Some of the examples of the heroes are as follows. Example Description Download link Centered hero This example shows the hero section at the center positions. Download Centered screenshot This example shows a centered screenshot within a hero section on a webpage. Download Responsive left-aligned hero with an image This example shows a left-aligned hero section with an image. Download Border hero with cropped and shadows image This example shows a hero section with a bordered and shadowed image on one side and text content on the other. Download Vertically centered heroes with form This example shows a vertically centered hero section with a form. Download Dark color hero This example shows a dark colored hero section for a website. Download Print Page Previous Next Advertisements ”;