Skip to content

Commit

Permalink
Improvements to borders and copy buttons (#2023)
Browse files Browse the repository at this point in the history
* Refactor border-radius styles to use CSS variable for consistency

* Update tooltip styles to use CSS variable for border-radius and enable overflow

* Add border-radius to inline code elements for improved styling

* Increase backdrop blur effect on copy button for enhanced visibility
  • Loading branch information
hichemfantar authored Jan 17, 2025
1 parent 0dccae1 commit be954bd
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions assets/css/autocomplete.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

.autocomplete-suggestions {
background-color: var(--autocompleteBackground);
border-radius: 8px;
border-radius: var(--borderRadius);
box-shadow: 0px 15px 99px 0px var(--autocompleteBorder);
overflow-y: auto;
max-height: 450px;
Expand Down Expand Up @@ -168,7 +168,7 @@
align-items: center;
text-decoration: none;
border: 1px solid var(--suggestionBorder);
border-radius: 8px;
border-radius: var(--borderRadius);
transition: color .3s ease-in-out;
background-color: var(--autocompletePreview);
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/content/admonition.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.content-inner section.admonition {
border-radius: 10px;
border-radius: var(--borderRadius);
border-left: 0;
}

Expand Down
8 changes: 6 additions & 2 deletions assets/css/content/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
.content-inner code {
background-color: var(--codeBackground);
vertical-align: baseline;
border-radius: 2px;
border-radius: var(--borderRadius);
padding: .1em .2em;
border: 1px solid var(--codeBorder);
text-transform: none;
}

.content-inner code.inline {
border-radius: 4px;
}

.content-inner pre {
margin: var(--baseLineHeight) 0;
}
Expand All @@ -26,7 +30,7 @@
display: block;
overflow-x: auto;
white-space: inherit;
padding: .5em 1em;
padding: 1em;
scrollbar-width: thin;
}

Expand Down
4 changes: 3 additions & 1 deletion assets/css/copy-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ pre .copy-button:focus {
top: 5px;
right: 5px;
padding: 4px;
background-color: var(--codeBackground);
background-color: transparent;
backdrop-filter: blur(4px);
border-radius: var(--borderRadius);
border: none;
cursor: pointer;
transition: all 150ms;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/custom-props/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* Layout & Whitespace */
--content-width: 949px;
--content-gutter: 60px;
--borderRadius: 4px;
--borderRadius: 8px;
--navTabBorderWidth: 4px;

/* Font Families */
Expand Down
4 changes: 2 additions & 2 deletions assets/css/search-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

.search-bar {
border: 1px solid var(--searchBarBorder);
border-radius: 8px;
border-radius: var(--borderRadius);
height: 48px;
position: relative;
width: 100%;
Expand All @@ -26,7 +26,7 @@
.top-search .search-bar .search-input {
background-color: var(--searchSearch);
border: 1px solid transparent;
border-radius: 8px;
border-radius: var(--borderRadius);
color: var(--searchAccentMain);
position: relative;
height: 46px;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
background-color: var(--settingsInputBackground);
color: var(--settingsInput);
border: 1px solid var(--settingsInputBorder);
border-radius: 8px;
border-radius: var(--borderRadius);
transition: border-color 150ms;
}
#settings-modal-content .input:focus {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/toast.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
padding: .7rem 1.2rem;
text-align: center;
font-weight: 700;
border-radius: 10px;
border-radius: var(--borderRadius);
border: 1px solid var(--codeBorder);
background-color: var(--codeBackground);
color: var(--textBody);
Expand Down
2 changes: 2 additions & 0 deletions assets/css/tooltips.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ as it has absolute positioning, so doesn't impact the layout and click events pa

.tooltip .tooltip-body {
border: 1px solid var(--codeBorder);
border-radius: var(--borderRadius);
overflow: auto;
}

.tooltip .tooltip-body .signature {
Expand Down

0 comments on commit be954bd

Please sign in to comment.