mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
Docs: replace CSS by utilities in examples (#35699)
* Drop .opacity-50 and .opacity-75 redefinition in examples * Drop unused .card-img-right from blog example CSS files * Use line-height utilities when possible * Use rounded-* utilities in examples * Replace .nav-underline by .nav-scroller and use it in examples.html default * Use .mb-1 for .blog-post-title * Remove unused CSS rule and use .fw-* utilities for carousels examples * Use utilities for cheatsheet examples * Extract some CSS to utilities for .nav-masthead .nav-link in cover example * Dashboard group of minor modifications * Dropdowns example: refactoring * Dropdowns example refactoring: fix linting by removing selector by id * Features example refactoring * Headers example refactoring * List groups example refactoring * Sidebars example refactoring * Sign-in example refactoring * Starter template refactoring * Fix RTL examples Co-authored-by: Mark Otto <markd.otto@gmail.com>
This commit is contained in:
@@ -67,7 +67,7 @@ body_class: ""
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<main>
|
||||
<main class="d-flex flex-nowrap">
|
||||
<h1 class="visually-hidden">Sidebars examples</h1>
|
||||
|
||||
<div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark" style="width: 280px;">
|
||||
@@ -189,27 +189,27 @@ body_class: ""
|
||||
</a>
|
||||
<ul class="nav nav-pills nav-flush flex-column mb-auto text-center">
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link active py-3 border-bottom" aria-current="page" title="Home" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<a href="#" class="nav-link active py-3 border-bottom rounded-0" aria-current="page" title="Home" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<svg class="bi pe-none" width="24" height="24" role="img" aria-label="Home"><use xlink:href="#home"/></svg>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link py-3 border-bottom" title="Dashboard" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<a href="#" class="nav-link py-3 border-bottom rounded-0" title="Dashboard" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<svg class="bi pe-none" width="24" height="24" role="img" aria-label="Dashboard"><use xlink:href="#speedometer2"/></svg>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link py-3 border-bottom" title="Orders" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<a href="#" class="nav-link py-3 border-bottom rounded-0" title="Orders" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<svg class="bi pe-none" width="24" height="24" role="img" aria-label="Orders"><use xlink:href="#table"/></svg>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link py-3 border-bottom" title="Products" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<a href="#" class="nav-link py-3 border-bottom rounded-0" title="Products" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<svg class="bi pe-none" width="24" height="24" role="img" aria-label="Products"><use xlink:href="#grid"/></svg>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link py-3 border-bottom" title="Customers" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<a href="#" class="nav-link py-3 border-bottom rounded-0" title="Customers" data-bs-toggle="tooltip" data-bs-placement="right">
|
||||
<svg class="bi pe-none" width="24" height="24" role="img" aria-label="Customers"><use xlink:href="#people-circle"/></svg>
|
||||
</a>
|
||||
</li>
|
||||
@@ -237,54 +237,54 @@ body_class: ""
|
||||
</a>
|
||||
<ul class="list-unstyled ps-0">
|
||||
<li class="mb-1">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="true">
|
||||
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="true">
|
||||
Home
|
||||
</button>
|
||||
<div class="collapse show" id="home-collapse">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
<li><a href="#" class="link-dark rounded">Overview</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Updates</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Reports</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Overview</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Updates</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Reports</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="mb-1">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#dashboard-collapse" aria-expanded="false">
|
||||
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#dashboard-collapse" aria-expanded="false">
|
||||
Dashboard
|
||||
</button>
|
||||
<div class="collapse" id="dashboard-collapse">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
<li><a href="#" class="link-dark rounded">Overview</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Weekly</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Monthly</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Annually</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Overview</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Weekly</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Monthly</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Annually</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="mb-1">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#orders-collapse" aria-expanded="false">
|
||||
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#orders-collapse" aria-expanded="false">
|
||||
Orders
|
||||
</button>
|
||||
<div class="collapse" id="orders-collapse">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
<li><a href="#" class="link-dark rounded">New</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Processed</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Shipped</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Returned</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">New</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Processed</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Shipped</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Returned</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="border-top my-3"></li>
|
||||
<li class="mb-1">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#account-collapse" aria-expanded="false">
|
||||
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#account-collapse" aria-expanded="false">
|
||||
Account
|
||||
</button>
|
||||
<div class="collapse" id="account-collapse">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
<li><a href="#" class="link-dark rounded">New...</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Profile</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Settings</a></li>
|
||||
<li><a href="#" class="link-dark rounded">Sign out</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">New...</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Profile</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Settings</a></li>
|
||||
<li><a href="#" class="link-dark d-inline-flex text-decoration-none rounded">Sign out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@@ -299,21 +299,21 @@ body_class: ""
|
||||
<span class="fs-5 fw-semibold">List group</span>
|
||||
</a>
|
||||
<div class="list-group list-group-flush border-bottom scrollarea">
|
||||
<a href="#" class="list-group-item list-group-item-action active py-3 lh-tight" aria-current="true">
|
||||
<a href="#" class="list-group-item list-group-item-action active py-3 lh-sm" aria-current="true">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small>Wed</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Tues</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Mon</small>
|
||||
@@ -321,63 +321,63 @@ body_class: ""
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight" aria-current="true">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm" aria-current="true">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Wed</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Tues</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Mon</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight" aria-current="true">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm" aria-current="true">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Wed</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Tues</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Mon</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight" aria-current="true">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm" aria-current="true">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Wed</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Tues</small>
|
||||
</div>
|
||||
<div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-tight">
|
||||
<a href="#" class="list-group-item list-group-item-action py-3 lh-sm">
|
||||
<div class="d-flex w-100 align-items-center justify-content-between">
|
||||
<strong class="mb-1">List group item heading</strong>
|
||||
<small class="text-muted">Mon</small>
|
||||
|
||||
@@ -8,8 +8,6 @@ html {
|
||||
}
|
||||
|
||||
main {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
height: 100vh;
|
||||
height: -webkit-fill-available;
|
||||
max-height: 100vh;
|
||||
@@ -19,18 +17,11 @@ main {
|
||||
|
||||
.dropdown-toggle { outline: 0; }
|
||||
|
||||
.nav-flush .nav-link {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.btn-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: .25rem .5rem;
|
||||
font-weight: 600;
|
||||
color: rgba(0, 0, 0, .65);
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
.btn-toggle:hover,
|
||||
.btn-toggle:focus {
|
||||
@@ -54,11 +45,9 @@ main {
|
||||
}
|
||||
|
||||
.btn-toggle-nav a {
|
||||
display: inline-flex;
|
||||
padding: .1875rem .5rem;
|
||||
margin-top: .125rem;
|
||||
margin-left: 1.25rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn-toggle-nav a:hover,
|
||||
.btn-toggle-nav a:focus {
|
||||
@@ -70,4 +59,3 @@ main {
|
||||
}
|
||||
|
||||
.fw-semibold { font-weight: 600; }
|
||||
.lh-tight { line-height: 1.25; }
|
||||
|
||||
Reference in New Issue
Block a user