Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 30,201 Bytes
1d4419b 89af3b2 1d4419b 89af3b2 1d4419b 89af3b2 1d4419b 89af3b2 1d4419b 89af3b2 1d4419b 89af3b2 1d4419b 89af3b2 1d4419b 82cdb59 1d4419b 82cdb59 1d4419b 82cdb59 1d4419b 82cdb59 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 1d4419b 2eae9f0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 | /* wave 51 -- lane E (the Sheet engine: ribbon, cells, rules, shortcuts).
Pre-created at the wave base with its @import in index.css so no lane edits index.css
(a shared file is a merge collision). Tokens only: var(--lp-*), var(--cg-z-*); no literal
font-size (verify_ui goes RED), no hex, no text-transform: uppercase (DESIGN.md section 2). */
/* == W51-T15 -- THE HOME RIBBON: a tab strip, a collapse chevron, and seven named groups. =====
This file EXTENDS the `.sheet-ribbon-*` vocabulary declared in `styles/wave50/sheet.css`
rather than restating it: the button, the popover, the swatch, the separator and the step
control all keep the rules they already have, and what is added here is the shell around them.
A second vocabulary for the same row is how two surfaces of one species drift apart.
The three shapes that carry the ticket:
1. `.sheet-ribbon-shell` is the FLEX CHILD of `.sheet-grid-wrap` now, so it is the thing that
must declare `flex: 0 0 auto`. `.sheet-ribbon` carried that before, one level down; a
shrinkable shell would let the grid squeeze it, and the opposite mistake is worse, because
glide renders NO CANVAS AT ALL at a measured height of zero rather than a clipped one.
2. `.sheet-ribbon-scroll` takes the groups and may scroll sideways at a narrow window.
`min-width: 0` is load bearing: a flex child will not scroll without it, it will push its
parent wider instead.
3. `.sheet-ribbon-group--utility` holds Refresh, OUTSIDE that scroller, which is the whole of
instruction 8: Refresh is on the same row as Bold, Italic and Underline, it is not on a
white line of its own, and it does not walk off the right edge when the window narrows. */
.sheet-ribbon-shell {
flex: 0 0 auto;
display: flex;
flex-direction: column;
background: var(--lp-surface-2);
}
.sheet-grid-canvas { background: var(--lp-surface); }
/* -- the tab strip, which is also the collapse chevron's home -------------------------------- */
.sheet-ribbon-tabs {
background: var(--lp-surface-2);
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 2px;
padding: 0 8px;
border-bottom: 1px solid var(--lp-line);
}
.sheet-ribbon-tablist {
display: flex;
align-items: center;
gap: 2px;
}
/* DESIGN.md 4's button reset in full. Sentence case, no caps, no letterspacing (DESIGN.md 2). */
.sheet-ribbon-tab {
appearance: none;
border: 0;
background: transparent;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-muted);
padding: 6px 10px;
border-bottom: 2px solid transparent;
cursor: pointer;
transition: color 150ms ease-out, border-color 150ms ease-out;
}
.sheet-ribbon-tab:hover:not(:disabled) {
background: var(--lp-line);
color: var(--lp-ink);
}
/* Blue is the active tab, because blue is selection (DESIGN.md 3). */
.sheet-ribbon-tab.is-on {
background: var(--lp-blue-tint);
color: var(--lp-ink);
border-bottom-color: var(--lp-blue);
}
.sheet-ribbon-chevron {
appearance: none;
border: 0;
background: transparent;
font: inherit;
color: var(--lp-muted);
margin-left: auto;
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: var(--lp-r-sm);
cursor: pointer;
transition: background-color 150ms ease-out, color 150ms ease-out;
}
.sheet-ribbon-chevron:hover:not(:disabled) {
background: var(--lp-line);
color: var(--lp-ink);
}
.sheet-ribbon-chevron.is-on {
background: var(--lp-blue-tint);
color: var(--lp-ink);
}
.sheet-ribbon-tab:disabled,
.sheet-ribbon-chevron:disabled { opacity: 0.45; cursor: default; }
/* -- the Home row --------------------------------------------------------------------------- */
/* `.sheet-ribbon` supplies the padding, the hairline and the surface; the row of GROUPS needs
its controls and their captions stacked, so the cross-axis alignment is the one override. */
.sheet-ribbon-home {
align-items: stretch;
gap: 0;
padding: 4px 8px;
}
.sheet-ribbon-scroll {
flex: 1 1 auto;
min-width: 0;
display: flex;
align-items: stretch;
overflow-x: auto;
overflow-y: hidden;
}
/* -- a group: its controls, then its name ---------------------------------------------------- */
.sheet-ribbon-group {
flex: 0 0 auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
gap: 2px;
padding: 0 8px;
border-right: 1px solid var(--lp-line);
}
.sheet-ribbon-group:last-child { border-right: 0; }
.sheet-ribbon-group-controls {
display: flex;
align-items: center;
gap: 1px;
}
/* R8 names the seven groups and the owner reads them by name, so each one says its name on the
screen as well as to a screen reader. Sentence case, muted, a scale token, never a literal. */
.sheet-ribbon-group-name {
font-size: var(--lp-fs-3xs);
line-height: 1;
color: var(--lp-muted);
white-space: nowrap;
}
.sheet-ribbon-group--utility {
margin-left: auto;
border-right: 0;
border-left: 1px solid var(--lp-line);
}
/* A control holding a word plus an icon needs the two to sit on one baseline; the button rule
already centres them, so all this adds is room for the pair not to touch. */
.sheet-ribbon-home .sheet-ribbon-btn { gap: 4px; }
.sheet-ribbon-home .sheet-ribbon-label { white-space: nowrap; }
/* == W51-T16 -- THE ROW HEIGHT AND COLUMN WIDTH ASK. ==========================================
ONE number, ONE label, TWO buttons. It is not a settings panel and it does not narrate itself
(DESIGN.md 4: never over-explain), and it is a CHILD of `.sheet-grid-wrap` rather than a portal
because portalling drops every descendant-scoped rule with no error at all.
It rides `--cg-z-menu`, which is the layer every other anchored panel over this grid uses, so
it stacks with them instead of inventing a number of its own (DESIGN.md 8). */
.sheet-ask {
position: absolute;
top: 96px;
left: 50%;
transform: translateX(-50%);
z-index: var(--cg-z-menu);
display: flex;
flex-direction: column;
gap: 8px;
min-width: 240px;
padding: 12px;
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
box-shadow: 0 8px 26px rgba(20, 24, 40, 0.14);
}
.sheet-ask-label {
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* The input's eight states are the house ones: it borrows the same border, radius and focus ring
every other field in the app carries rather than declaring a ninth appearance. */
.sheet-ask-input {
appearance: none;
font: inherit;
font-size: var(--lp-fs-xs);
color: var(--lp-ink);
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
padding: 6px 8px;
width: 100%;
}
.sheet-ask-input:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
border-color: var(--lp-blue-deep);
}
.sheet-ask-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
/* DESIGN.md 4's button reset in full, so no UA chrome leaks through. */
.sheet-ask-btn {
appearance: none;
border: 1px solid var(--lp-line);
background: transparent;
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
border-radius: var(--lp-r-sm);
padding: 6px 12px;
cursor: pointer;
transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.sheet-ask-btn:hover { background: var(--lp-surface-2); }
/* `--lp-primary` is the primary CTA and nothing else is (DESIGN.md 3), and the label keeps the
600 weight the measured 7.71:1 pairing ships with. */
.sheet-ask-btn.is-primary {
background: var(--lp-primary);
border-color: var(--lp-primary);
color: var(--lp-surface);
font-weight: 600;
}
.sheet-ask-btn.is-primary:hover {
background: var(--lp-primary-hover);
border-color: var(--lp-primary-hover);
}
/* == W51-T17 -- THE SHORTCUTS PANEL AND THE FIND BOX (ruling R7, R14, contract C8). ===========
Both surfaces are children of `.sheet-grid-wrap`, never portals: a portal drops every
descendant-scoped rule it was styled by, silently, and neither of these belongs anywhere but
over the grid it reads. `.sheet-grid-wrap` is already the positioning parent for `.sheet-ask`
and the cell action bar, so they sit in the same coordinate space those do.
ONLY NEW CLASSES LIVE HERE. This lane sheet is imported from `index.css`, which is EAGER, while
`styles/wave50/sheet.css` is imported inside the Sheet's own lazily loaded chunk and therefore
wins any rule the two both declare. Redeclaring a `.sheet-*` class from that sheet here would
lose, with no error; adding new ones cannot.
Tokens only: no hex, no literal font-size, no ALL CAPS chrome, motion 150 ms ease-out on
opacity and transform. */
.sheet-shortcuts {
position: absolute;
top: 96px;
right: 16px;
bottom: 16px;
width: 380px;
max-width: calc(100% - 32px);
z-index: var(--cg-z-menu);
display: flex;
flex-direction: column;
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
box-shadow: 0 8px 26px rgba(20, 24, 40, 0.14);
animation: sheet-shortcuts-in 150ms ease-out;
}
@keyframes sheet-shortcuts-in {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
.sheet-shortcuts-head {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 12px 12px 8px 16px;
border-bottom: 1px solid var(--lp-line);
}
.sheet-shortcuts-title {
margin: 0;
font-size: var(--lp-fs-xs);
font-weight: 600;
color: var(--lp-ink);
}
.sheet-shortcuts-close {
appearance: none;
border: 0;
background: transparent;
font: inherit;
color: var(--lp-muted);
padding: 4px;
border-radius: var(--lp-r-sm);
cursor: pointer;
display: inline-flex;
transition: background 150ms ease-out, color 150ms ease-out;
}
.sheet-shortcuts-close:hover {
background: var(--lp-surface-2);
color: var(--lp-ink);
}
.sheet-shortcuts-close:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
.sheet-shortcuts-icon {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
}
.sheet-shortcuts-list {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
margin: 0;
padding: 8px 0;
list-style: none;
}
.sheet-shortcuts-row {
display: grid;
grid-template-columns: 132px 1fr;
gap: 4px 12px;
padding: 6px 16px;
align-items: baseline;
}
.sheet-shortcuts-row + .sheet-shortcuts-row {
border-top: 1px solid var(--lp-line);
}
.sheet-shortcuts-keys {
font-family: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
background: var(--lp-surface-2);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
padding: 2px 6px;
justify-self: start;
white-space: nowrap;
}
.sheet-shortcuts-action {
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
.sheet-shortcuts-when {
grid-column: 2;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-shortcuts-foot {
flex: 0 0 auto;
margin: 0;
padding: 8px 16px 12px;
border-top: 1px solid var(--lp-line);
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* -- Ctrl+F's box. One row, at the top right of the grid, out of the way of the cells. -------- */
/* ββ W54-T07 -- ANCHORED TO THE BOTTOM, AND THE REASON IS THAT NO TOP OFFSET CAN BE RIGHT.
This read `top: 96px`, measured once against a ribbon that has since changed height twice. The
ribbon shell measures 108px today and the formula bar ends at 135px, both relative to
`.sheet-grid-wrap`, so the box was painting straight over the group captions and the formula
input; widening it for W54-T07's Replace row made that obvious rather than causing it.
β AND A BIGGER NUMBER WOULD NOT FIX IT EITHER: the ribbon COLLAPSES (the chevron), so its
height is two different values and any single top offset is wrong in one of them. Anchoring to
the BOTTOM of the grid is collapse proof and needs no measurement, clearing the sheet tab bar
rather than the chrome above. Firefox puts its find bar here for the same reason.
β `flex-wrap` and the width cap are the Replace row's half: with a second input and two more
buttons the row wants about 890px against the 570px it used to, which would otherwise run off
the left edge of a narrow sheet. */
.sheet-find {
position: absolute;
bottom: 56px;
right: 16px;
max-width: calc(100% - 32px);
z-index: var(--cg-z-menu);
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
box-shadow: 0 6px 18px rgba(20, 24, 40, 0.14);
animation: sheet-shortcuts-in 150ms ease-out;
}
.sheet-find-label {
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-find-input {
appearance: none;
font: inherit;
width: 200px;
padding: 4px 8px;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
}
.sheet-find-input:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
border-color: var(--lp-blue-deep);
}
.sheet-find-btn {
appearance: none;
font: inherit;
padding: 4px 10px;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
cursor: pointer;
transition: background 150ms ease-out;
}
.sheet-find-btn:hover { background: var(--lp-surface-2); }
.sheet-find-btn:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
/* == W51-T18 -- CONDITIONAL FORMATTING AND THE VALIDATION DROPDOWN ============================
THREE SURFACES, AND EACH ONE STATES WHERE IT LIVES.
1. `.sheet-rules-*` and `.sheet-validation-*` are the BODIES of contract C8's dialog, which
renders through `BodyPortal` as a direct child of <body>. Every class here is therefore
TOP LEVEL: a descendant-scoped rule (`.sheet-body .sheet-rules`) would be dead the moment
the portal moved the node, with no error of any kind.
2. `.sheet-dropdown-*` extends `.cg-pop`, which `index.css` declares unscoped, exactly as
the grid's own right-click menu does. The overlay carries its own surface class because a
portalled panel that does not is transparent over the canvas (the v59 scar).
3. The kit's dialog panel is min(420px, 100vw - 32px) and this file does NOT widen it. A
rules row is therefore a stacked CARD rather than a wide row, which is the same anatomy
the field rail uses for a stacked editor.
Tokens only: no hex, no literal font-size, no ALL CAPS chrome, motion 150 ms ease-out on
opacity and transform (DESIGN.md sections 2, 3, 4 and 5). */
.sheet-rules {
display: flex;
flex-direction: column;
gap: 10px;
}
.sheet-rules-note,
.sheet-rules-empty {
margin: 0;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* S67-T12: Excel's Rules Manager is a LIST, so the rules dialog takes the wider panel. Scoped by
:has() rather than by a class this file adds to the kit's markup (precedent wave59/templates.css). */
.lp-dialog:has(.sheet-rules) {
width: min(720px, calc(100vw - 32px));
}
/* One containment layer: the list is a hairline table, and a row is a line in it, not a card. */
.sheet-rules-table {
display: flex;
flex-direction: column;
min-height: 0;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
}
/* The head and every row share ONE column template, so Rule, Format and Applies to align. */
.sheet-rules-head {
display: grid;
grid-template-columns: 24px minmax(0, 1fr) 104px 128px 76px;
gap: 8px;
padding: 6px 8px;
border-bottom: 1px solid var(--lp-line);
font-size: var(--lp-fs-3xs);
color: var(--lp-muted);
}
.sheet-rules-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
max-height: 52vh;
overflow-y: auto;
}
/* S67-T12: a rule is ONE summary row; its editor opens under it (`.is-open`). The class name is
the W51-T18 one on purpose, and verify_api pins that it is declared. */
.sheet-rules-card {
display: flex;
flex-direction: column;
border-bottom: 1px solid var(--lp-line);
background: var(--lp-surface);
}
.sheet-rules-card:last-child {
border-bottom: 0;
}
.sheet-rules-line {
display: grid;
grid-template-columns: 24px minmax(0, 1fr) 76px;
gap: 8px;
align-items: center;
padding: 2px 8px;
transition: background-color 150ms ease-out;
}
.sheet-rules-card:hover > .sheet-rules-line {
background: var(--lp-surface-2);
}
.sheet-rules-card.is-open > .sheet-rules-line {
background: var(--lp-blue-tint);
}
.sheet-rules-pick {
appearance: none;
border: 0;
background: transparent;
font: inherit;
color: inherit;
cursor: pointer;
display: grid;
grid-template-columns: minmax(0, 1fr) 104px 128px;
gap: 8px;
align-items: center;
min-width: 0;
padding: 5px 0;
text-align: left;
border-radius: var(--lp-r-sm);
}
.sheet-rules-pick:focus-visible {
outline: 2px solid var(--lp-blue);
outline-offset: 1px;
}
.sheet-rules-summary,
.sheet-rules-where {
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
.sheet-rules-where {
color: var(--lp-muted);
font-variant-numeric: tabular-nums;
}
/* The Format column: the rule's own paint on sample text. A rule colour is DATA (any #rrggbb or
a palette token) and rides the inline style; the frame around it is tokens. */
.sheet-rules-preview {
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
width: 96px;
height: 20px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-3xs);
}
.sheet-rules-preview.is-bold {
font-weight: 600;
}
.sheet-rules-preview.is-none {
color: var(--lp-muted);
}
.sheet-rules-preview.is-bar {
justify-content: flex-start;
padding: 3px;
}
.sheet-rules-preview-bar {
width: 60%;
height: 100%;
border-radius: var(--lp-r-sm);
}
/* A refusal Save raised for THIS rule, on its own row (deep red on white, DESIGN.md section 3). */
.sheet-rules-card.is-flagged .sheet-rules-order {
color: var(--lp-red-deep);
}
.sheet-rules-flag {
margin: 0;
padding: 0 8px 6px 40px;
font-size: var(--lp-fs-3xs);
color: var(--lp-red-deep);
}
.sheet-rules-editor {
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px 8px 10px 40px;
border-top: 1px solid var(--lp-line);
animation: sheet-rules-open 150ms ease-out;
}
.sheet-rules-editor > .sheet-rules-row {
flex-wrap: wrap;
}
@keyframes sheet-rules-open {
from { opacity: 0; transform: translateY(-2px); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.sheet-rules-editor { animation: none; }
}
.sheet-rules-row {
display: flex;
align-items: flex-end;
gap: 8px;
}
.sheet-rules-order {
flex: 0 0 auto;
min-width: 18px;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
font-variant-numeric: tabular-nums;
}
.sheet-rules-field {
flex: 1 1 auto;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
/* Sentence case micro-label: no caps, and therefore no letterspacing (DESIGN.md section 2). */
.sheet-rules-label {
font-size: var(--lp-fs-3xs);
color: var(--lp-muted);
letter-spacing: normal;
}
.sheet-rules-input,
.sheet-rules-select {
width: 100%;
box-sizing: border-box;
appearance: none;
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
padding: 5px 7px;
transition: border-color 150ms ease-out;
}
/* S66-T12: a select sizes to its LONGEST option rather than to a share of the row, so "Highlight
cells" and "Is not empty" are never clipped. */
.sheet-rules-field.is-select {
flex: 0 0 auto;
}
.sheet-rules-field.is-select > .sheet-rules-select {
width: auto;
min-width: 9em;
}
.sheet-rules-input:focus-visible,
.sheet-rules-select:focus-visible {
outline: 2px solid var(--lp-blue);
outline-offset: 1px;
border-color: var(--lp-blue);
}
.sheet-rules-moves {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 2px;
}
/* DESIGN.md section 4 button reset in full, so no UA chrome leaks into the card. */
.sheet-rules-move,
.sheet-rules-remove,
.sheet-rules-add,
.sheet-rules-bold,
.sheet-rules-swatch {
appearance: none;
border: 0;
background: transparent;
font: inherit;
color: inherit;
cursor: pointer;
}
.sheet-rules-move,
.sheet-rules-remove {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: var(--lp-r-sm);
color: var(--lp-muted);
transition: background-color 150ms ease-out, color 150ms ease-out;
}
.sheet-rules-move:hover:not(:disabled),
.sheet-rules-remove:hover {
background: var(--lp-surface-2);
color: var(--lp-ink);
}
.sheet-rules-move:disabled {
opacity: 0.4;
cursor: default;
}
.sheet-rules-move:focus-visible,
.sheet-rules-remove:focus-visible,
.sheet-rules-add:focus-visible,
.sheet-rules-bold:focus-visible,
.sheet-rules-swatch:focus-visible {
outline: 2px solid var(--lp-blue);
outline-offset: 1px;
}
/* ONE chevron shape, rotated, so the pair cannot drift apart. */
.sheet-rules-move.is-down .sheet-rules-icon {
transform: rotate(180deg);
}
.sheet-rules-icon {
width: 14px;
height: 14px;
}
.sheet-rules-paint {
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.sheet-rules-swatches {
display: inline-flex;
align-items: center;
gap: 3px;
}
/* β `var(--lp-line)`, not a `--lp-line-strong`: no such token is declared in index.css and
`verify_icons::ghost_tokens` counts one. W51-T16 fixed exactly this in this file already. */
.sheet-rules-swatch {
width: 18px;
height: 18px;
border-radius: var(--lp-r-sm);
border: 1px solid var(--lp-line);
transition: transform 150ms ease-out;
}
.sheet-rules-swatch.is-ink {
background: var(--lp-surface);
font-size: var(--lp-fs-3xs);
font-weight: 600;
line-height: 1;
}
.sheet-rules-swatch.is-on {
outline: 2px solid var(--lp-blue);
outline-offset: 1px;
}
.sheet-rules-bold {
width: 22px;
height: 22px;
border-radius: var(--lp-r-sm);
border: 1px solid var(--lp-line);
font-weight: 600;
color: var(--lp-muted);
}
.sheet-rules-bold.is-on {
background: var(--lp-surface-2);
color: var(--lp-ink);
border-color: var(--lp-blue);
}
.sheet-rules-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.sheet-rules-add {
font-size: var(--lp-fs-2xs);
color: var(--lp-blue-deep);
padding: 4px 6px;
border-radius: var(--lp-r-sm);
transition: background-color 150ms ease-out;
}
.sheet-rules-add:hover {
background: var(--lp-surface-2);
}
.sheet-rules-count {
font-size: var(--lp-fs-3xs);
color: var(--lp-muted);
font-variant-numeric: tabular-nums;
}
/* A refusal is a sentence, and it rides the deep red so it is readable on white
(DESIGN.md section 3: pastels are fills, text rides the deep companion). */
.sheet-rules-refusal,
.sheet-validation-refusal {
margin: 0;
font-size: var(--lp-fs-2xs);
color: var(--lp-red-deep);
}
/* -- the validation list editor -------------------------------------------------------------- */
.sheet-validation {
display: flex;
flex-direction: column;
gap: 8px;
}
.sheet-validation-label {
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
.sheet-validation-box {
width: 100%;
box-sizing: border-box;
resize: vertical;
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
padding: 7px 8px;
transition: border-color 150ms ease-out;
}
.sheet-validation-box:focus-visible {
outline: 2px solid var(--lp-blue);
outline-offset: 1px;
border-color: var(--lp-blue);
}
.sheet-validation-count {
margin: 0;
font-size: var(--lp-fs-3xs);
color: var(--lp-muted);
font-variant-numeric: tabular-nums;
}
/* -- the dropdown cell editor ---------------------------------------------------------------- */
.sheet-dropdown {
display: flex;
flex-direction: column;
min-width: 190px;
max-width: 300px;
padding: 6px;
gap: 4px;
animation: sheet-dropdown-in 150ms ease-out;
}
@keyframes sheet-dropdown-in {
from { opacity: 0; transform: translateY(2px); }
to { opacity: 1; transform: translateY(0); }
}
.sheet-dropdown-search {
width: 100%;
box-sizing: border-box;
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
background: var(--lp-surface);
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-sm);
padding: 5px 7px;
}
.sheet-dropdown-search:focus-visible {
outline: 2px solid var(--lp-blue);
outline-offset: 1px;
border-color: var(--lp-blue);
}
.sheet-dropdown-list {
display: flex;
flex-direction: column;
max-height: 220px;
overflow-y: auto;
}
.sheet-dropdown-row,
.sheet-dropdown-clear {
appearance: none;
border: 0;
background: transparent;
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
text-align: left;
padding: 5px 7px;
border-radius: var(--lp-r-sm);
cursor: pointer;
transition: background-color 150ms ease-out;
}
.sheet-dropdown-row:hover,
.sheet-dropdown-clear:hover {
background: var(--lp-surface-2);
}
.sheet-dropdown-row:focus-visible,
.sheet-dropdown-clear:focus-visible {
outline: 2px solid var(--lp-blue);
outline-offset: -1px;
}
.sheet-dropdown-row[aria-selected="true"] {
background: var(--lp-blue-tint);
}
.sheet-dropdown-clear {
border-top: 1px solid var(--lp-line);
border-radius: 0;
color: var(--lp-muted);
}
.sheet-dropdown-none {
margin: 0;
padding: 6px 7px;
font-size: var(--lp-fs-2xs);
color: var(--lp-muted);
}
/* == W51-T34 / R17 -- THE FROZEN ROW BAND: a second grid, above the first. ====================
glide-data-grid 6.0.3 has no leading-row freeze (freezeTrailingRows pins rows at the BOTTOM),
so the frozen rows are drawn by a second DataEditor mounted above the body and scrolled with
it. Three rules hold that box together, and each of them is load bearing:
1. THE SELECTOR IS DESCENDANT ON PURPOSE. wave49/sheet.css declares
`.sheet-grid-canvas > * { flex: 1 1 auto; min-height: 0; }`, which would let the band
grow into the body's space. That rule and a bare `.sheet-frozen-rows` have the same
specificity, and wave49/sheet.css is imported inside the Sheet's own lazily loaded chunk
while this file is imported from index.css, so the lazy one wins a tie. Naming the parent
takes the band out of the tie rather than relying on load order
([[a-lazy-chunk-stylesheet-beats-an-eager-one]]).
2. `flex: 0 0 auto` WITH AN INLINE HEIGHT. The height is the band's rows plus its one header
row and is computed in the component, because it moves with the row height dialog.
3. `min-height: 0` ON THE CHILD, so glide's wrapper takes its height as a flex item rather
than resolving 100% against a parent that has none. At a measured height of zero glide
renders NO CANVAS AT ALL rather than a clipped one, which is W50-T19's whole lesson. */
.sheet-grid-canvas > .sheet-frozen-rows {
flex: 0 0 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
/* The seam between the frozen rows and the body reads as one line, not as two grids.
The token is `--lp-line`: `--lp-line-strong` is a GHOST that index.css never declared,
and W51-T18's own leg reds this stylesheet for naming it. */
border-bottom: 1px solid var(--lp-line);
}
.sheet-frozen-rows > * {
flex: 1 1 auto;
min-height: 0;
}
/* The panes panel asks two numbers and offers four acts, so its buttons wrap rather than
squeezing; everything else is the row height ask's own appearance. */
.sheet-freeze-ask .sheet-ask-actions {
flex-wrap: wrap;
}
/* ββ S67-T15: the Borders gallery (Excel's menu, entry for entry) βββββββββββββββββββββββββββββ
Each row is an icon and a label; Line Color and Line Style carry a chevron to their flyout.
Separators, the "Draw Borders" heading and the line samples are the only new shapes, and all
of them are chrome, so every value here is a token. The swatch chips inside the Line Color
flyout take the person's hex inline from the component (DESIGN.md 3: a border colour is data). */
.sheet-border-item {
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}
.sheet-border-item .sheet-border-icon {
flex: 0 0 auto;
color: var(--lp-ink);
}
.sheet-border-label {
flex: 1 1 auto;
}
.sheet-border-more {
display: inline-flex;
margin-left: 12px;
color: var(--lp-muted);
}
.sheet-border-sep {
height: 1px;
margin: 4px 2px;
background: var(--lp-line);
}
.sheet-border-heading {
padding: 4px 8px 2px;
font-size: var(--lp-fs-2xs);
font-weight: 600;
color: var(--lp-muted);
}
/* The flyout is a DOM child of the gallery panel (see `ribbonHome.tsx::BorderFlyout`), lifted
beside its item by an inline `position: fixed`; `z-index` keeps it above the rows it overlaps. */
.sheet-border-flyout {
z-index: 1;
min-width: 132px;
}
.sheet-ribbon-swatches.sheet-border-swatches {
grid-template-columns: repeat(5, 1fr);
}
.sheet-border-swatches .sheet-ribbon-swatch.is-on {
box-shadow: inset 0 0 0 2px var(--lp-primary);
}
.sheet-border-style {
padding-top: 7px;
padding-bottom: 7px;
}
.sheet-border-sample {
width: 56px;
height: 10px;
color: var(--lp-ink);
}
|