char-slop/berry
multipurpose self-modifiable agentic harness
git clone https://git.t4t.associates/char-slop/berry
ece94e9
main
1/* the history down the side, and the shown revision's changes beside it, each scrolling on its own */ 2. diff-view { 3display : grid; 4grid-template-columns : minmax ( 224 px , 304 px ) minmax ( 0 , 1 fr ); 5height : 100 % ; 6min-height : 0 ; 7} 8. diff-view . spacer { 9flex : 1 ; 10} 11 12/* history, as jj log draws it */ 13. diff-log { 14overflow-y : auto; 15background : var ( --panel ); 16border-right : 1 px solidvar ( --line ); 17font-size : var ( --text-small ); 18} 19. diff-log . revision { 20display : flex; 21flex-direction : column; 22gap : 2 px ; 23padding : 8 px 12 px ; 24color : var ( --text ); 25border-bottom : 1 px solidvar ( --line ); 26/* a long history lays out only the entries in sight */ 27content-visibility : auto; 28contain-intrinsic-size : auto64 px ; 29} 30. diff-log . revision : hover { 31background : var ( --raised ); 32} 33. diff-log . revision [aria-current = "page" ]{ 34background : var ( --raised ); 35box-shadow : inset2 px 0 var ( --accent ); 36} 37. diff-log . revision [aria-current = "page" ]: hover { 38box-shadow : inset2 px 0 var ( --accent-fade ); 39} 40. diff-log . revision . immutable . revision-summary { 41color : var ( --muted ); 42} 43. revision-line { 44display : flex; 45flex-wrap : wrap; 46align-items : baseline; 47gap : 0 1 ch ; 48font-family : var ( --mono ); 49} 50. diff-view . glyph { 51color : var ( --muted ); 52} 53. diff-view [aria-current = "page" ]. glyph { 54color : var ( --accent ); 55} 56. diff-view [aria-current = "page" ]: hover . glyph { 57color : var ( --accent-fade ); 58} 59. diff-view . change , 60. diff-view . commit { 61color : var ( --muted ); 62} 63. diff-view . change b { 64font-weight : 600 ; 65color : var ( --hl-builtin ); 66} 67. diff-view . commit b { 68font-weight : 600 ; 69color : var ( --hl-keyword ); 70} 71. diff-view . ref { 72color : var ( --hl-ident ); 73} 74. diff-view . tag { 75margin-right : 0.5 ch ; 76color : var ( --hl-string ); 77} 78. diff-view . tag . conflict { 79color : var ( --error ); 80} 81. revision-summary { 82overflow : hidden; 83text-overflow : ellipsis; 84white-space : nowrap; 85} 86. revision-summary . none , 87. commit-subject . none { 88color : var ( --muted ); 89} 90. revision-meta { 91color : var ( --muted ); 92font-size : var ( --text-small ); 93} 94. diff-log . more { 95width : 100 % ; 96padding : 8 px ; 97} 98 99. diff-main { 100overflow-y : auto; 101min-width : 0 ; 102padding : 0 24 px 32 px ; 103} 104/* An inherited cursor on the pane restyles every diff row on each refresh in Firefox. */ 105. diff-head . loading { 106cursor : progress; 107} 108. diff-view . meta { 109margin : 8 px 0 0 ; 110color : var ( --muted ); 111font-size : var ( --text-ui ); 112} 113. diff-error { 114margin : 8 px 0 0 ; 115color : var ( --error ); 116font-family : var ( --mono ); 117font-size : var ( --text-small ); 118white-space : pre-wrap; 119} 120 121/* the commit as sorcery's commit view: subject and body as one block, then its metadata */ 122. diff-head { 123padding : 16 px 0 8 px ; 124} 125. commit-subject { 126margin : 0 ; 127font-size : var ( --text-title ); 128font-weight : 600 ; 129} 130. commit-body { 131margin : 8 px 0 0 ; 132padding : 0 ; 133background : none; 134border : 0 ; 135font : inherit; 136color : var ( --muted ); 137white-space : pre-wrap; 138} 139. commit-reword textarea { 140box-sizing : border-box; 141width : 100 % ; 142resize : vertical; 143font-family : var ( --mono ); 144} 145. commit-reword . diff-error : empty { 146display : none; 147} 148. commit-reword-actions { 149display : flex; 150align-items : baseline; 151gap : 8 px ; 152margin-top : 8 px ; 153} 154. commit-reword-actions . meta { 155margin : 0 ; 156} 157table . commit-meta { 158margin-top : 16 px ; 159border-collapse : collapse; 160font-size : var ( --text-ui ); 161} 162table . commit-meta th { 163padding : 0 24 px 0 0 ; 164text-align : left; 165vertical-align : top; 166font-weight : 400 ; 167color : var ( --muted ); 168} 169table . commit-meta td { 170font-family : var ( --mono ); 171word-break : break-all; 172} 173. diff-toolbar { 174display : flex; 175flex-wrap : wrap; 176align-items : center; 177gap : 8 px 16 px ; 178margin-top : 16 px ; 179font-size : var ( --text-ui ); 180} 181. diffstat { 182display : flex; 183gap : 12 px ; 184white-space : nowrap; 185} 186. diff-view . add-count { 187color : var ( --added ); 188} 189. diff-view . del-count { 190color : var ( --removed ); 191} 192. diff-view . generated-count { 193color : var ( --muted ); 194} 195. diff-layout { 196display : inline-flex; 197} 198/* a choice of two, which a box keeps together */ 199. diff-layout button { 200padding : 2 px 8 px ; 201background : var ( --raised ); 202border : 1 px solidvar ( --line ); 203color : var ( --muted ); 204} 205. diff-layout button + button { 206border-left : 0 ; 207} 208. diff-layout button [aria-pressed = "true" ]{ 209color : var ( --accent ); 210border-color : var ( --line-strong ); 211} 212. diff-layout button [aria-pressed = "true" ]: hover { 213color : var ( --accent-fade ); 214} 215. diff-index { 216display : grid; 217grid-template-columns : max-content max-content max-contentminmax ( 0 , 1 fr ); 218column-gap : 12 px ; 219margin : 12 px 0 0 ; 220padding : 0 ; 221list-style : none; 222font-family : var ( --mono ); 223font-size : var ( --text-small ); 224} 225. diff-index li { 226display : grid; 227grid-template-columns : subgrid; 228grid-column : 1 / -1 ; 229align-items : baseline; 230} 231. diff-index button { 232display : grid; 233grid-template-columns : subgrid; 234grid-column : span2 ; 235align-items : baseline; 236min-width : 0 ; 237color : var ( --text ); 238text-align : left; 239overflow-wrap : anywhere; 240} 241. diff-index . status { 242font-weight : 600 ; 243} 244. diff-index : is (. add-count , . del-count ) { 245text-align : right; 246white-space : nowrap; 247} 248. diff-view . status { 249color : var ( --muted ); 250} 251. diff-view . status . added { 252color : var ( --added ); 253} 254. diff-view . status . deleted { 255color : var ( --removed ); 256} 257. diff-view . status : is (. renamed , . copied ) { 258color : var ( --hl-keyword ); 259} 260 261/* each file in its own box, as sorcery's, its header staying while the file scrolls past; files out of sight are not 262laid out, and until one has been it takes about the height of its rows */ 263. file-diff { 264margin-top : 16 px ; 265border : 1 px solidvar ( --line ); 266content-visibility : auto; 267contain-intrinsic-size : autocalc ( var ( --rows ) * 16 px + 36 px ); 268} 269. file-summary { 270position : sticky; 271top : 0 ; 272z-index : 1 ; 273display : flex; 274align-items : baseline; 275gap : 4 px ; 276padding : 4 px 12 px 4 px 4 px ; 277background : var ( --panel ); 278color : var ( --muted ); 279font-size : var ( --text-ui ); 280} 281. file-summary . chevron { 282align-self : stretch; 283} 284. file-summary-content { 285display : inline-flex; 286flex-wrap : wrap; 287align-items : baseline; 288gap : 0 8 px ; 289flex : 1 ; 290min-width : 0 ; 291} 292. file-summary-content . path { 293font-family : var ( --mono ); 294font-weight : 600 ; 295color : var ( --text ); 296overflow-wrap : anywhere; 297} 298. file-actions { 299display : inline-flex; 300align-items : baseline; 301gap : 8 px ; 302margin-left : auto; 303} 304. file-actions . mode { 305font-family : var ( --mono ); 306color : var ( --hl-keyword ); 307} 308. file-actions . generated-note { 309font-style : italic; 310} 311. file-actions . viewed { 312display : inline-flex; 313align-items : center; 314gap : 4 px ; 315} 316. file-diff . file-note { 317margin : 0 ; 318padding : 8 px 12 px ; 319border-top : 1 px solidvar ( --line ); 320} 321 322. diff-content { 323border-top : 1 px solidvar ( --line ); 324} 325. diff-chunk { 326content-visibility : auto; 327contain-intrinsic-size : autocalc ( var ( --rows ) * 16 px ); 328overflow : clip; 329} 330. diff-plain { 331margin : 0 ; 332border : 0 ; 333background : none; 334color : var ( --text ); 335font-family : var ( --mono ); 336font-size : var ( --text-small ); 337white-space : pre-wrap; 338overflow-wrap : anywhere; 339tab-size : 4 ; 340padding : 0 8 px 0 120 px ; 341} 342. diff-plain-split { 343display : grid; 344grid-template-columns : minmax ( 0 , 1 fr ) minmax ( 0 , 1 fr ); 345} 346. diff-plain-split . diff-plain { 347padding-left : 64 px ; 348} 349 350/* lines as sorcery's: rows tinted by what happened to them, marks drawn beside the text */ 351table . diff { 352width : 100 % ; 353border-collapse : collapse; 354table-layout : fixed; 355font-family : var ( --mono ); 356font-size : var ( --text-small ); 357} 358table . diff col . gutter { 359width : 56 px ; 360} 361table . diff td { 362padding : 0 8 px ; 363vertical-align : top; 364} 365table . diff td . text { 366white-space : pre-wrap; 367word-break : break-word; 368tab-size : 4 ; 369} 370table . diff . split td . text + td . ln { 371border-left : 1 px solidvar ( --line ); 372} 373table . diff td . text :: before { 374content : " " ; 375display : inline-block; 376width : 1 ch ; 377margin-right : 0.5 ch ; 378} 379table . diff td . text . add :: before { 380content : "+" ; 381color : var ( --added ); 382} 383table . diff td . text . del :: before { 384content : "-" ; 385color : var ( --removed ); 386} 387table . diff td . ln { 388min-width : 40 px ; 389text-align : right; 390white-space : nowrap; 391color : var ( --muted ); 392user-select : none; 393} 394. diff-fold { 395padding : 2 px 8 px ; 396font-family : var ( --mono ); 397font-size : var ( --text-small ); 398color : var ( --muted ); 399background : var ( --panel ); 400} 401. diff-fold . fold { 402font : inherit; 403} 404table . diff tr . add , 405table . diff . split td . add { 406background : color-mix ( in srgb, var ( --added ) 9 % , transparent); 407} 408table . diff tr . del , 409table . diff . split td . del { 410background : color-mix ( in srgb, var ( --removed ) 9 % , transparent); 411} 412table . diff td . none { 413background : repeating-linear-gradient ( 414-45 deg , 415 transparent0 4 px , 416color-mix ( in srgb, var ( --line ) 35 % , transparent) 4 px 5 px 417); 418} 419table . diff mark { 420color : inherit; 421border-radius : 2 px ; 422} 423table . diff . add mark . word { 424background : color-mix ( in srgb, var ( --added ) 25 % , transparent); 425} 426table . diff . del mark . word { 427background : color-mix ( in srgb, var ( --removed ) 25 % , transparent); 428} 429table . diff mark . space { 430background : color-mix ( in srgb, var ( --error ) 55 % , transparent); 431} 432table . diff . badge { 433margin-left : 0.5 ch ; 434color : var ( --muted ); 435user-select : none; 436} 437 438@media ( max-width : 700 px ) { 439. diff-view { 440grid-template-columns : minmax ( 0 , 1 fr ); 441grid-template-rows : autominmax ( 0 , 1 fr ); 442} 443. diff-log { 444max-height : 30 vh ; 445border-right : 0 ; 446border-bottom : 1 px solidvar ( --line ); 447} 448} 449 450. file-diff : has (. diff-edit ) { 451content-visibility : visible; 452} 453/* the bar under an edited file's header; save is its one button, the rest read as links */ 454. diff-edit-tools { 455display : flex; 456flex-wrap : wrap; 457align-items : center; 458gap : 4 px 16 px ; 459padding : 4 px 12 px ; 460background : var ( --panel ); 461border-top : 1 px solidvar ( --line ); 462font-size : var ( --text-small ); 463} 464. diff-edit-tools [role = "status" ]{ 465flex : 1 ; 466min-width : 192 px ; 467color : var ( --muted ); 468white-space : pre-wrap; 469} 470. diff-edit-tools . diff-save { 471padding : 0 ; 472} 473. diff-conflict : not ( [hidden ]) { 474display : inline-flex; 475gap : 16 px ; 476} 477. diff-edit-tools . diff-force , 478. diff-conflict button . link { 479color : var ( --accent ); 480} 481. diff-edit-tools button . link : disabled { 482color : var ( --muted ); 483} 484 485/* the editor drawn as the read-only table: the same type, gutter, marks and tints. codemirror's own theme is scoped 486by generated classes, so these need the extra specificity of .cm-editor */ 487. diff-edit-surface { 488border-top : 1 px solidvar ( --line ); 489} 490. diff-edit-surface . cm-editor { 491font-size : var ( --text-small ); 492color : var ( --text ); 493background : none; 494} 495. diff-edit-surface . cm-editor . cm-focused { 496outline : none; 497} 498. diff-edit-surface . cm-editor . cm-scroller { 499font-family : var ( --mono ); 500} 501. diff-edit-surface . cm-editor . cm-content { 502padding : 0 ; 503tab-size : 4 ; 504caret-color : var ( --accent ); 505} 506. diff-edit-surface . cm-editor : is (. cm-line , . cm-deletedLine ) { 507padding : 0 8 px 0 0 ; 508} 509. diff-edit-surface . cm-editor . cm-deletedChunk { 510padding : 0 ; 511} 512. diff-edit-surface . cm-editor . cm-gutters { 513background : none; 514border : 0 ; 515color : var ( --muted ); 516} 517. diff-edit-surface . cm-editor . cm-lineNumbers . cm-gutterElement { 518min-width : 40 px ; 519padding : 0 8 px ; 520box-sizing : content-box; 521} 522. diff-edit-surface . cm-editor . cm-changeGutter { 523width : 1.5 ch ; 524padding : 0 ; 525} 526. diff-edit-surface . cm-editor . cm-changeGutter . cm-gutterElement { 527background : none; 528} 529. diff-edit-surface . cm-editor . cm-changeGutter . cm-addedRow :: before { 530content : "+" ; 531color : var ( --added ); 532} 533. diff-edit-surface . cm-editor . cm-changeGutter : is (. cm-removedRow , . cm-deletedLineGutter ):: before { 534content : "-" ; 535color : var ( --removed ); 536} 537. diff-edit-surface . cm-editor : is (. cm-changedLine , . cm-gutterElement . cm-addedRow ) { 538background : color-mix ( in srgb, var ( --added ) 9 % , transparent); 539} 540. diff-edit-surface . cm-editor : is (. cm-deletedChunk , . cm-gutterElement : is (. cm-removedRow , . cm-deletedLineGutter )), 541. diff-edit-surface . cm-editor . cm-merge-a . cm-changedLine { 542background : color-mix ( in srgb, var ( --removed ) 9 % , transparent); 543} 544. diff-edit-surface . cm-editor : is (. cm-changedText , . cm-deletedText ) { 545border-radius : 2 px ; 546background : color-mix ( in srgb, var ( --added ) 25 % , transparent); 547} 548. diff-edit-surface . cm-editor : is (. cm-deletedText , . cm-deletedChunk . cm-deletedText ), 549. diff-edit-surface . cm-editor . cm-merge-a . cm-changedText { 550background : color-mix ( in srgb, var ( --removed ) 25 % , transparent); 551} 552/* the read-only diff marks words only where a line was changed, not where one was added or removed outright */ 553. diff-edit-surface . cm-editor . cm-wholeChange . cm-changedText , 554. diff-edit-surface . cm-editor . cm-deletedChunk : not (: has ( + . cm-changedLine )) . cm-deletedText { 555background : none; 556} 557. diff-edit-surface . cm-editor . cm-collapsedLines { 558padding : 2 px 0 ; 559color : var ( --muted ); 560background : none; 561} 562. diff-edit-surface . cm-editor . cm-collapsedLines :: before { 563content : "⋯" ; 564margin-inline-end : 1 ch ; 565} 566. diff-edit-surface . cm-editor . cm-collapsedLines :: after { 567content : none; 568} 569. diff-edit-surface . cm-editor . cm-collapsedLines : hover { 570color : var ( --accent ); 571} 572. diff-edit-surface . cm-editor . cm-mergeSpacer { 573background : repeating-linear-gradient ( 574-45 deg , 575 transparent0 4 px , 576color-mix ( in srgb, var ( --line ) 35 % , transparent) 4 px 5 px 577); 578} 579. diff-edit-surface . cm-mergeView { 580overflow : visible; 581} 582. diff-edit-surface . cm-mergeViewEditor + . cm-mergeViewEditor { 583border-left : 1 px solidvar ( --line ); 584} 585 586. diff-leave { 587background : var ( --panel ); 588color : var ( --text ); 589border : 1 px solidvar ( --line ); 590max-width : min ( 480 px , 90 vw ); 591} 592. diff-leave button + button { 593margin-left : 8 px ; 594} 595. diff-leave :: backdrop { 596background : var ( --scrim ); 597} 598. diff-edit-report { 599color : var ( --muted ); 600font-size : var ( --text-ui ); 601}