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:
@@ -1,19 +1,8 @@
|
||||
.feature-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
color: #fff;
|
||||
border-radius: .75rem;
|
||||
}
|
||||
|
||||
.icon-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.icon-link > .bi {
|
||||
margin-top: .125rem;
|
||||
margin-left: .125rem;
|
||||
@@ -25,18 +14,10 @@
|
||||
}
|
||||
|
||||
.icon-square {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
font-size: 1.5rem;
|
||||
border-radius: .75rem;
|
||||
}
|
||||
|
||||
.rounded-4 { border-radius: .5rem; }
|
||||
.rounded-5 { border-radius: 1rem; }
|
||||
|
||||
.text-shadow-1 { text-shadow: 0 .125rem .25rem rgba(0, 0, 0, .25); }
|
||||
.text-shadow-2 { text-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); }
|
||||
.text-shadow-3 { text-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25); }
|
||||
|
||||
@@ -71,34 +71,34 @@ body_class: ""
|
||||
<h2 class="pb-2 border-bottom">Columns with icons</h2>
|
||||
<div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
|
||||
<div class="feature col">
|
||||
<div class="feature-icon bg-primary bg-gradient">
|
||||
<div class="feature-icon d-inline-flex align-items-center justify-content-center bg-primary bg-gradient rounded-5 text-white fs-2 mb-3">
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#collection"/></svg>
|
||||
</div>
|
||||
<h2>Featured title</h2>
|
||||
<p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p>
|
||||
<a href="#" class="icon-link">
|
||||
<a href="#" class="icon-link d-inline-flex align-items-center">
|
||||
Call to action
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#chevron-right"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="feature col">
|
||||
<div class="feature-icon bg-primary bg-gradient">
|
||||
<div class="feature-icon d-inline-flex align-items-center justify-content-center bg-primary bg-gradient rounded-5 text-white fs-2 mb-3">
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#people-circle"/></svg>
|
||||
</div>
|
||||
<h2>Featured title</h2>
|
||||
<p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p>
|
||||
<a href="#" class="icon-link">
|
||||
<a href="#" class="icon-link d-inline-flex align-items-center">
|
||||
Call to action
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#chevron-right"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="feature col">
|
||||
<div class="feature-icon bg-primary bg-gradient">
|
||||
<div class="feature-icon d-inline-flex align-items-center justify-content-center bg-primary bg-gradient rounded-5 text-white fs-2 mb-3">
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#toggles2"/></svg>
|
||||
</div>
|
||||
<h2>Featured title</h2>
|
||||
<p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p>
|
||||
<a href="#" class="icon-link">
|
||||
<a href="#" class="icon-link d-inline-flex align-items-center">
|
||||
Call to action
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#chevron-right"/></svg>
|
||||
</a>
|
||||
@@ -112,7 +112,7 @@ body_class: ""
|
||||
<h2 class="pb-2 border-bottom">Hanging icons</h2>
|
||||
<div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
|
||||
<div class="col d-flex align-items-start">
|
||||
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
|
||||
<div class="icon-square bg-light text-dark d-inline-flex align-items-center justify-content-center fs-4 rounded-5 flex-shrink-0 me-3">
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#toggles2"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
@@ -124,7 +124,7 @@ body_class: ""
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex align-items-start">
|
||||
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
|
||||
<div class="icon-square bg-light text-dark d-inline-flex align-items-center justify-content-center fs-4 rounded-5 flex-shrink-0 me-3">
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#cpu-fill"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
@@ -136,7 +136,7 @@ body_class: ""
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex align-items-start">
|
||||
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
|
||||
<div class="icon-square bg-light text-dark d-inline-flex align-items-center justify-content-center fs-4 rounded-5 flex-shrink-0 me-3">
|
||||
<svg class="bi" width="1em" height="1em"><use xlink:href="#tools"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
@@ -157,7 +157,7 @@ body_class: ""
|
||||
|
||||
<div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5">
|
||||
<div class="col">
|
||||
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style="background-image: url('unsplash-photo-1.jpg');">
|
||||
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-6 shadow-lg" style="background-image: url('unsplash-photo-1.jpg');">
|
||||
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
|
||||
<h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Short title, long jacket</h2>
|
||||
<ul class="d-flex list-unstyled mt-auto">
|
||||
@@ -178,7 +178,7 @@ body_class: ""
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style="background-image: url('unsplash-photo-2.jpg');">
|
||||
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-6 shadow-lg" style="background-image: url('unsplash-photo-2.jpg');">
|
||||
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
|
||||
<h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Much longer title that wraps to multiple lines</h2>
|
||||
<ul class="d-flex list-unstyled mt-auto">
|
||||
@@ -199,7 +199,7 @@ body_class: ""
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style="background-image: url('unsplash-photo-3.jpg');">
|
||||
<div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-6 shadow-lg" style="background-image: url('unsplash-photo-3.jpg');">
|
||||
<div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1">
|
||||
<h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Another longer title belongs here</h2>
|
||||
<ul class="d-flex list-unstyled mt-auto">
|
||||
|
||||
Reference in New Issue
Block a user