Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix small CSS issues with sticky first column #3

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
td.never { background-color: #ff95e0; }
td.na { color: #888; }
td.unknown { color: #888; }
tr:nth-child(even) td { background-color: #f8f8f8; }
tr:hover td { background-color: #eff; }
tr:nth-child(even), tr:nth-child(even) td:first-child { background-color: #f8f8f8; }
tr:hover, tr:hover td:first-child { background-color: #eff; }

/* based on https://css-tricks.com/rotated-table-column-headers/ */
.rotate { padding: 0; height: 100px; white-space: nowrap; }
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ const popup = (...kids) => {
}
};
let content;
const root = dom.div(style({ position: 'fixed', top: 0, right: 0, bottom: 0, left: 0, backgroundColor: 'rgba(0, 0, 0, 0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 1 }), function keydown(e) {
const root = dom.div(style({ position: 'fixed', top: 0, right: 0, bottom: 0, left: 0, backgroundColor: 'rgba(0, 0, 0, 0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 2 }), function keydown(e) {
if (e.key === 'Escape') {
e.stopPropagation();
close();
Expand Down Expand Up @@ -1131,7 +1131,7 @@ const init = async () => {
const features = (state.Features || []).filter(f => checkFilters(f) && (!featregex || featregex.test(f.ID)) && matchTextFeature(f));
software.sort((a, b) => a.ID < b.ID ? -1 : 1);
features.sort((a, b) => a.ID < b.ID ? -1 : 1);
const ntable = dom.table(dom.thead(style({ position: 'sticky', top: '0', backgroundColor: 'white', zIndex: '2' }), dom.tr(dom.td(style({ verticalAlign: 'bottom', textAlign: 'right', fontWeight: 'bold' }), 'Features ', dom.clickbutton('+', attr.title('Add feature'), function click() {
const ntable = dom.table(dom.thead(style({ position: 'sticky', top: '0', backgroundColor: 'white', zIndex: 2 }), dom.tr(dom.td(style({ verticalAlign: 'bottom', textAlign: 'right', fontWeight: 'bold' }), 'Features ', dom.clickbutton('+', attr.title('Add feature'), function click() {
const nf = {
ID: '',
Created: new Date(),
Expand Down
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const popup = (...kids: ElemArg[]) => {
}
let content: HTMLElement
const root = dom.div(
style({position: 'fixed', top: 0, right: 0, bottom: 0, left: 0, backgroundColor: 'rgba(0, 0, 0, 0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 1}),
style({position: 'fixed', top: 0, right: 0, bottom: 0, left: 0, backgroundColor: 'rgba(0, 0, 0, 0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 2}),
function keydown(e: KeyboardEvent) {
if (e.key === 'Escape') {
e.stopPropagation()
Expand Down Expand Up @@ -591,7 +591,7 @@ console.log('qs', qs)
features.sort((a: api.Feature, b: api.Feature) => a.ID < b.ID ? -1 : 1)
const ntable = dom.table(
dom.thead(
style({position: 'sticky', top: '0', backgroundColor: 'white', zIndex: '2'}),
style({position: 'sticky', top: '0', backgroundColor: 'white', zIndex: 2}),
dom.tr(
dom.td(
style({verticalAlign: 'bottom', textAlign: 'right', fontWeight: 'bold'}),
Expand Down