Skip to content

Commit

Permalink
fix: preview: font-size and header layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mbnuqw committed Feb 23, 2024
1 parent 5c48dd8 commit f2baa32
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
19 changes: 11 additions & 8 deletions src/injections/tab-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ async function main() {
flex-shrink: 0;
width: 100%;
background-color: var(--hbg);
font-size: 16px;
color: var(--hfg);
overflow: hidden;
`
Expand All @@ -266,13 +267,14 @@ async function main() {
headerEl.appendChild(state.titleEl)
state.titleEl.style.cssText = `
position: relative;
margin: 6px 8px;
margin: 6px 8px 4px;
padding: 0;
font-size: .875rem;
font-size: .875em;
font-weight: 700;
/* line-height: 1.1rem;
max-height: 2.2rem;
/* line-height: 1.2em;
max-height: 2.4em;
overflow: clip; */
line-height: 1.2em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand All @@ -284,13 +286,14 @@ async function main() {
headerEl.appendChild(state.urlEl)
state.urlEl.style.cssText = `
position: relative;
margin: 4px 8px 8px;
margin: 0 8px 8px;
padding: 0;
font-size: .75rem;
font-size: .8125em;
font-weight: 400;
/* line-height: 1rem;
max-height: 2rem;
/* line-height: 1.2em;
max-height: 2.4em;
overflow: clip; */
line-height: 1.2em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
7 changes: 4 additions & 3 deletions src/popup.tab-preview/tab-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
color-scheme: light dark;
background-color: light-dark(#eee, #333);
animation: appearing .2s;
font-size: 16px;
}
body {
padding: 0;
Expand All @@ -42,7 +43,7 @@
}
#title {
position: relative;
margin: 6px 8px;
margin: 6px 8px 4px;
padding: 0;
font-size: .875rem;
font-weight: 700;
Expand All @@ -55,9 +56,9 @@
}
#url {
position: relative;
margin: 4px 8px 8px;
margin: 0 8px 8px;
padding: 0;
font-size: .75rem;
font-size: .8125rem;
font-weight: 400;
/* line-height: 1rem;
max-height: 2rem;
Expand Down

0 comments on commit f2baa32

Please sign in to comment.