Skip to content

Commit 925710d

Browse files
authored
Remove CSS bootstrap dependency (#15251)
Follow-up of #15208. This PR removes the CSS `bootstrap` dependency which contains 1504 CSS rules and weights 16.1 kB minified. Considering we used less than 50 of these rules, it's quite a waste. So this time, there are minor UI changes: * The "expand/collapse all" buttons icon changed. It now uses the one from font-awesome. It's quite close but not exactly the same. * The layout is slightly different (you need to switch between two tabs to actually see the difference). Before this PR: <img width="719" height="515" alt="image" src="https://github.com/user-attachments/assets/1f067046-4ee9-49ee-bf38-50a8bf9888f2" /> With this PR: <img width="719" height="515" alt="image" src="https://github.com/user-attachments/assets/80331c98-1a1e-418f-b481-5b3f5c276926" /> With this, we will be able to go even further on reducing the page size next. =D This time, the DOM size itself reduced a bit but the difference is too small to be noteworthy. r? @samueltardieu changelog: Remove CSS bootstrap dependency
2 parents d98d7c0 + 102e39f commit 925710d

File tree

2 files changed

+337
-67
lines changed

2 files changed

+337
-67
lines changed

util/gh-pages/index_template.html

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
<title>Clippy Lints</title> {# #}
1616

17-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/> {# #}
1817
<link id="githubLightHighlight" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github.min.css" disabled="true" /> {# #}
1918
<link id="githubDarkHighlight" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github-dark.min.css" disabled="true" /> {# #}
2019

@@ -59,9 +58,9 @@ <h1 class="page-header">Clippy Lints <span class="badge">Total number: {{+ count
5958

6059
<div id="menu-filters"> {# #}
6160
<div class="panel-body row"> {# #}
62-
<div id="upper-filters" class="col-12 col-md-5"> {# #}
63-
<div class="btn-group" id="lint-levels" tabindex="-1"> {# #}
64-
<button type="button" class="btn btn-default dropdown-toggle"> {# #}
61+
<div id="upper-filters"> {# #}
62+
<div id="lint-levels" tabindex="-1"> {# #}
63+
<button type="button" class="btn-default dropdown-toggle"> {# #}
6564
Lint levels <span class="badge">4</span> <span class="caret"></span> {# #}
6665
</button> {# #}
6766
<ul class="dropdown-menu" id="lint-levels-selector"> {# #}
@@ -74,8 +73,8 @@ <h1 class="page-header">Clippy Lints <span class="badge">Total number: {{+ count
7473
<li role="separator" class="divider"></li> {# #}
7574
</ul> {# #}
7675
</div> {# #}
77-
<div class="btn-group" id="lint-groups" tabindex="-1"> {# #}
78-
<button type="button" class="btn btn-default dropdown-toggle"> {# #}
76+
<div id="lint-groups" tabindex="-1"> {# #}
77+
<button type="button" class="btn-default dropdown-toggle"> {# #}
7978
Lint groups <span class="badge">9</span> <span class="caret"></span> {# #}
8079
</button> {# #}
8180
<ul class="dropdown-menu" id="lint-groups-selector"> {# #}
@@ -91,8 +90,8 @@ <h1 class="page-header">Clippy Lints <span class="badge">Total number: {{+ count
9190
<li role="separator" class="divider"></li> {# #}
9291
</ul> {# #}
9392
</div> {# #}
94-
<div class="btn-group" id="version-filter" tabindex="-1"> {# #}
95-
<button type="button" class="btn btn-default dropdown-toggle"> {# #}
93+
<div id="version-filter" tabindex="-1"> {# #}
94+
<button type="button" class="btn-default dropdown-toggle"> {# #}
9695
Version {#+ #}
9796
<span id="version-filter-count" class="badge">0</span> {#+ #}
9897
<span class="caret"></span> {# #}
@@ -104,8 +103,8 @@ <h1 class="page-header">Clippy Lints <span class="badge">Total number: {{+ count
104103
<li role="separator" class="divider"></li> {# #}
105104
</ul> {# #}
106105
</div> {# #}
107-
<div class="btn-group" id="lint-applicabilities" tabindex="-1"> {# #}
108-
<button type="button" class="btn btn-default dropdown-toggle"> {# #}
106+
<div id="lint-applicabilities" tabindex="-1"> {# #}
107+
<button type="button" class="btn-default dropdown-toggle"> {# #}
109108
Applicability {#+ #}
110109
<span class="badge">4</span> {#+ #}
111110
<span class="caret"></span> {# #}
@@ -121,22 +120,20 @@ <h1 class="page-header">Clippy Lints <span class="badge">Total number: {{+ count
121120
</ul> {# #}
122121
</div> {# #}
123122
</div> {# #}
124-
<div class="col-12 col-md-5 search-control"> {# #}
123+
<div class="search-control"> {# #}
125124
<div class="input-group"> {# #}
126125
<label class="input-group-addon" id="filter-label" for="search-input">Filter:</label> {# #}
127126
<input type="text" class="form-control filter-input" placeholder="Keywords or search string (`S` or `/` to focus)" id="search-input" /> {# #}
128-
<span class="input-group-btn"> {# #}
129-
<button class="filter-clear btn" type="button" onclick="searchState.clearInput(event)"> {# #}
130-
Clear {# #}
131-
</button> {# #}
132-
</span> {# #}
127+
<button class="filter-clear" type="button" onclick="searchState.clearInput(event)"> {# #}
128+
Clear {# #}
129+
</button> {# #}
133130
</div> {# #}
134131
</div> {# #}
135-
<div class="col-12 col-md-2 btn-group expansion-group"> {# #}
136-
<button title="Collapse All" class="btn btn-default expansion-control" type="button" id="collapse-all"> {# #}
132+
<div class="btn-group expansion-group"> {# #}
133+
<button title="Collapse All" class="btn-default expansion-control" type="button" id="collapse-all"> {# #}
137134
<span class="glyphicon glyphicon-collapse-up"></span> {# #}
138135
</button> {# #}
139-
<button title="Expand All" class="btn btn-default expansion-control" type="button" id="expand-all"> {# #}
136+
<button title="Expand All" class="btn-default expansion-control" type="button" id="expand-all"> {# #}
140137
<span class="glyphicon glyphicon-collapse-down"></span> {# #}
141138
</button> {# #}
142139
</div> {# #}

0 commit comments

Comments
 (0)