Rollup merge of #104663 - notriddle:notriddle/button-cursor, r=GuillaumeGomez

rustdoc: factor out common button CSS
This commit is contained in:
Matthias Krüger 2022-11-22 00:01:11 +01:00 committed by GitHub
commit 78cbe9ce84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 8 deletions

View File

@ -290,20 +290,21 @@ p:last-child {
button {
/* Buttons on Safari have different default padding than other platforms. Make them the same. */
padding: 1px 6px;
/* Opinionated tweak: use pointer cursor as clickability signifier. */
cursor: pointer;
}
/* end tweaks for normalize.css 8 */
button#toggle-all-docs {
padding: 0;
background: none;
border: none;
cursor: pointer;
/* iOS button gradient: https://stackoverflow.com/q/5438567 */
-webkit-appearance: none;
opacity: 1;
}
/* end tweaks for normalize.css 8 */
.rustdoc {
display: flex;
flex-direction: row;
@ -1305,7 +1306,6 @@ a.test-arrow:hover {
#titles > button {
text-align: center;
font-size: 1.125rem;
cursor: pointer;
border: 0;
border-top: 2px solid;
flex: 1;
@ -1345,7 +1345,6 @@ a.test-arrow:hover {
font-weight: bold;
background: none;
color: inherit;
cursor: pointer;
text-align: center;
border: none;
outline: none;
@ -1367,7 +1366,6 @@ a.test-arrow:hover {
#settings-menu > a, #help-button > a, #copy-path {
width: 33px;
cursor: pointer;
line-height: 1.5;
}
@ -1796,7 +1794,6 @@ in storage.js
z-index: 10;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
cursor: pointer;
border: 1px solid;
border-left: 0;
}
@ -1967,7 +1964,6 @@ in storage.js
position: absolute;
top: 0.25em;
z-index: 1;
cursor: pointer;
padding: 0;
background: none;
border: none;

View File

@ -0,0 +1,24 @@
// This test ensures that several clickable items actually have the pointer cursor.
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
// the `[+]/[-]` button
assert-css: ("#toggle-all-docs", {"cursor": "pointer"})
// the button next to the path header
assert-css: ("#copy-path", {"cursor": "pointer"})
// the search tabs
write: (".search-input", "Foo")
// To be SURE that the search will be run.
press-key: 'Enter'
// Waiting for the search results to appear...
wait-for: "#titles"
assert-css: ("#titles > button", {"cursor": "pointer"})
// mobile sidebar toggle button
size: (500, 700)
assert-css: (".sidebar-menu-toggle", {"cursor": "pointer"})
// the sidebar toggle button on the source code pages
goto: "file://" + |DOC_PATH| + "/src/lib2/lib.rs.html"
assert-css: ("#sidebar-toggle > button", {"cursor": "pointer"})