Comments (1)
I've investigated this issue, and found that this performance problem is caused by this line of code
Lines 506 to 508 in 4dcc376
legend {
// Omitted piece of code...
+ * {
clear: left; // 2
}
// Omitted piece of code...
}
This line was added as a fix in the following pull request: #30345. It fixes bug/behavior when leading elements after the legend
are rendered in one line. Example link could be found in the following comment (after opening scroll it horizontally): #29712 (comment).
But, this bug/behavior is caused by the another pull request: #28917 where the following line of code has been added:
legend {
float: left; // 1
// Omitted piece of code...
}
It was added, because when we want to have a border on the fieldset
element, it will be rendered not properly. Links with the example in the following comment:
#30345 (comment).
So let's recap. The main reason why all of this was added is the presence of a border on the fieldset
element. But, the correct rendering of the border could be achieved with the outline
property, instead of the border
property.
Example link: https://stackblitz.com/edit/js-dydeas?file=index.html.
fieldset {
border: none;
outline: 3px solid #dee2e6;
}
This approach works well for rendering a border around a fieldset
element and also does not have the problem with the leading element next to the legend
.
I've already created a pull request for it: #39498.
Since the method proposed above solves the problem of an incorrectly rendered border, I believe that we can safely remove unnecessary lines (which I suggested removing in my pull request). Because the problem described by @rajapandiyan-settu really greatly affects the performance.
Please review this issue and let me know if this proposal is suitable?
Related issues
P.S. @rajapandiyan-settu
Specific to your situation, you can download already minified bootstrap.min.css
file into your project, so that you will use it not from CDN, but directly from your project, and delete unneccessary lines of code specified above.
P.S.2. @julien-deramond I've noticed that you reacted with the 👀 emoji, so maybe this investigation will be helpful for you.
from bootstrap.
Related Issues (20)
- Adding new SCSS variables for `letter-spacing` HOT 1
- Floating Labels for File Input
- Suggest a new feature
- input add min-inline-size:0;
- Modal of Bootstrap v5.3 did not work! HOT 1
- How RTL support works with Sass in Bootstrap.
- The dropdown is not working after updating navbar content using HTMX
- Define `$component-active-color` with `color-contrast()` HOT 1
- Active nav links with default style look inactive HOT 2
- Request for recovery of One Time Key
- docs: Improve install guide for modern use like in scss.
- Reduce CSS variable overrides for colors HOT 1
- Add a glass effect to dropdowns HOT 3
- Floating labels incorrectly positioned for inputs with autofill, but no value HOT 2
- Upon initial launch of the Bootstrap modal NVDA reads all the content of the modal
- System UI font not used on WebKit
- bootstrap
- Carousel More Gallery HOT 1
- Offcanvas - dispose() not reseting scrollbars
- overflow-x-scroll has an !important applied negating respinsive directives HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap.