Skip to content

Commit

Permalink
table view: improve columns width (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
lieser committed Jul 24, 2021
1 parent a73d6c2 commit ef01660
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 0 deletions.
30 changes: 30 additions & 0 deletions content/keysView.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#keysTable {
table-layout: auto;
}

td[data-column-name="sdid"] {
width: 10em;
max-width: max(10em, 30vw);
}

td[data-column-name="selector"] {
width: 10em;
max-width: max(10em, 20vw);
}

td[data-column-name="key"] {
white-space: nowrap;
max-width: 5em;
}

td[data-column-name="insertedAt"] {
width: 7em;
}

td[data-column-name="lastUsedAt"] {
width: 7em;
}

td[data-column-name="secure"] {
width: 1em;
}
1 change: 1 addition & 0 deletions content/keysView.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel='stylesheet' type='text/css' href="chrome://global/skin/in-content/common.css">

<link rel='stylesheet' type='text/css' href="./table.css">
<link rel='stylesheet' type='text/css' href="./keysView.css">

<script type="module" src="./translation.mjs.js"></script>
<script type="module" src="./keysView.mjs.js"></script>
Expand Down
26 changes: 26 additions & 0 deletions content/signRulesDefaultsView.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#rulesTable {
table-layout: auto;
}

td[data-column-name="domain"] {
width: 10em;
max-width: max(10em, 30vw);
}

td[data-column-name="addr"] {
width: 10em;
max-width: max(10em, 20vw);
}

td[data-column-name="sdid"] {
width: 10em;
max-width: max(10em, 20vw);
}

td[data-column-name="type"] {
width: 1em;
}

td[data-column-name="priority"] {
width: 1em;
}
1 change: 1 addition & 0 deletions content/signRulesDefaultsView.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel='stylesheet' type='text/css' href="chrome://global/skin/in-content/common.css">

<link rel='stylesheet' type='text/css' href="./table.css">
<link rel='stylesheet' type='text/css' href="./signRulesDefaultsView.css">

<script type="module" src="./translation.mjs.js"></script>
<script type="module" src="./signRulesDefaultsView.mjs.js"></script>
Expand Down
35 changes: 35 additions & 0 deletions content/signRulesUserView.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#rulesTable {
table-layout: auto;
}

td[data-column-name="domain"] {
width: 10em;
max-width: max(10em, 15vw);
}

td[data-column-name="listId"] {
width: 10em;
max-width: max(10em, 10vw);
}

td[data-column-name="addr"] {
width: 7em;
max-width: max(7em, 10vw);
}

td[data-column-name="sdid"] {
width: 7em;
max-width: max(7em, 10vw);
}

td[data-column-name="type"] {
width: 1em;
}

td[data-column-name="priority"] {
width: 1em;
}

td[data-column-name="enabled"] {
width: 1em;
}
1 change: 1 addition & 0 deletions content/signRulesUserView.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel='stylesheet' type='text/css' href="chrome://global/skin/in-content/common.css">

<link rel='stylesheet' type='text/css' href="./table.css">
<link rel='stylesheet' type='text/css' href="./signRulesUserView.css">

<script type="module" src="./translation.mjs.js"></script>
<script type="module" src="./signRulesUserView.mjs.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions content/table.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
table {
border-collapse: collapse;
margin: 20px;
width: calc(100% - 40px);
}

th {
Expand All @@ -10,6 +11,8 @@ th {
th, td {
border-inline: 1px solid var(--in-content-box-border-color);
padding: 3px 4px;
overflow: hidden;
text-overflow: ellipsis;
}

tr:nth-child(even) {
Expand Down

0 comments on commit ef01660

Please sign in to comment.