mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Cleaned up CSS vars and reduced font size a bit
This commit is contained in:
1 parent
a6126c9e27
commit
f3f497f40f
5 files changed
+11
-6
No files matched your search
@@ -5,7 +5,7 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
line-height: 20px;
|
||||
line-height: var(--line-height-data);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
flex: 0 0 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
font-size: var(--font-size-large);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
flex: 0 0 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
font-size: var(--font-size-large);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -79,6 +79,10 @@ export default function Tree(props: Props) {
|
||||
[baseDepth, numElements, getElementAtIndex]
|
||||
);
|
||||
|
||||
const itemSize = parseInt(
|
||||
getComputedStyle(document.body).getPropertyValue('--line-height-data')
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.Tree}>
|
||||
<div className={styles.SearchInput}>
|
||||
@@ -98,7 +102,7 @@ export default function Tree(props: Props) {
|
||||
height={height}
|
||||
itemCount={numElements}
|
||||
itemData={itemData}
|
||||
itemSize={20}
|
||||
itemSize={itemSize}
|
||||
ref={listRef}
|
||||
width={width}
|
||||
>
|
||||
|
||||
@@ -45,8 +45,9 @@
|
||||
--color-tree-node-selected: var(--theme-light-tree-node-selected);
|
||||
--color-tree-node-hover: var(--theme-light-tree-node-hover);
|
||||
|
||||
--font-size-normal: 12px;
|
||||
--line-height-data: 1.5rem;
|
||||
--font-size-normal: 11px;
|
||||
--font-size-large: 15px;
|
||||
--line-height-data: 18px;
|
||||
|
||||
/* GitHub.com system fonts */
|
||||
--font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo,
|
||||
|
||||
Reference in new issue
Block a user