2828@layers-input-bg : rgba (255 , 255 , 255 , 0.04 );
2929@layers-input-bg-focus : rgba (255 , 255 , 255 , 0.06 );
3030@layers-row-height : 26px ;
31+ @layers-label-min-width : 72px ;
32+ @layers-tools-width : 74px ;
3133@layers-indent : 14px ;
3234@layers-mono : ui-monospace , SFMono- Regular, " SF Mono" , Menlo, Consolas, monospace ;
3335@layers-prop-name : #9cdcfe ;
418420 }
419421
420422 .layers-node {
423+ position : relative ;
421424 display : flex ;
422425 align-items : center ;
423426 height : @layers-row-height ;
493496 }
494497 }
495498
496- .layers-node-tag {
497- min-width : 0 ;
498- overflow : hidden ;
499- text-overflow : ellipsis ;
500- color : @project-panel-text-1 ;
499+ .layers-tree .layers-node-label {
500+ flex : 1 1 auto ;
501+ min-width : @layers-label-min-width ;
502+ contain : inline- size;
501503 }
502504
503505 .layers-node-actions {
504506 display : none ;
507+ position : absolute ;
508+ top : 0 ;
509+ right : 0 ;
510+ bottom : 0 ;
511+ left : 0 ;
512+ pointer-events : none ;
513+ }
514+
515+ .layers-node-tools {
516+ display : flex ;
505517 align-items : center ;
506518 gap : 1px ;
507519 position : sticky ;
508520 right : 0 ;
521+ width : fit-content ;
522+ height : 100% ;
509523 margin-left : auto ;
510- padding-left : 6px ;
511- flex : none ;
524+ padding : 0 6px ;
525+ box-sizing : border-box ;
526+ pointer-events : auto ;
512527 background : @layers-row-bg ;
513528 }
514529
515530 .layers-node :hover .layers-node-actions ,
516531 .layers-node.layers-actions-open .layers-node-actions ,
517532 .layers-node-actions :focus-within {
518- display : flex ;
533+ display : block ;
519534 }
520535
521- .layers-node :hover .layers-node-actions {
522- background : @layers-row-hover-bg ;
536+ .layers-node :hover .layers-node-label ,
537+ .layers-node.layers-actions-open .layers-node-label ,
538+ .layers-node :focus-within .layers-node-label {
539+ padding-right : @layers-tools-width ;
523540 }
524541
525- .layers-node .layers-selected .layers-node-actions {
526- background : @layers-row-select-bg ;
542+ .layers-tree .layers-kbd-nav .layers-node :hover : not ( .layers -actions-open ) .layers-node-label {
543+ padding-right : 0 ;
527544 }
528545
529- .layers-node.layers-cursor .layers-node-actions {
546+ .layers-node :hover .layers-node-tools ,
547+ .layers-node.layers-cursor .layers-node-tools {
530548 background : @layers-row-hover-bg ;
531549 }
532550
533- .layers-node-action {
534- .layers-icon-button ();
535-
536- & .layers-disabled {
537- opacity : 0.3 ;
538- cursor : default ;
539- pointer-events : none ;
540- }
541- }
542-
543- .layers-node-grip {
544- display : flex ;
545- align-items : center ;
546- justify-content : center ;
547- width : 16px ;
548- height : 20px ;
549- flex : none ;
550- color : @project-panel-text-2 ;
551- cursor : grab ;
552-
553- svg {
554- width : 13px ;
555- height : 13px ;
556- display : block ;
557- }
558-
559- & :hover {
560- color : @project-panel-text-1 ;
561- }
551+ .layers-node.layers-selected .layers-node-tools {
552+ background : @layers-row-select-bg ;
562553 }
563554
564- .layers-node-text {
565- color : @project-panel-text-2 ;
566- font-style : italic ;
567- overflow : hidden ;
568- text-overflow : ellipsis ;
555+ .layers-node-action {
556+ .layers-icon-button ();
569557 }
570558
571559 .layers-drop-line {
814802 }
815803}
816804
805+ .layers-node-label {
806+ display : flex ;
807+ align-items : baseline ;
808+ min-width : 0 ;
809+ overflow : hidden ;
810+ }
811+
812+ .layers-node-name ,
813+ .layers-node-text {
814+ min-width : 0 ;
815+ overflow : hidden ;
816+ text-overflow : ellipsis ;
817+ }
818+
819+ .layers-node-name {
820+ color : @project-panel-text-1 ;
821+ }
822+
823+ .layers-node-tag {
824+ flex : none ;
825+ margin-left : 5px ;
826+ color : @project-panel-text-2 ;
827+
828+ & :first-child {
829+ margin-left : 0 ;
830+ color : @project-panel-text-1 ;
831+ }
832+ }
833+
834+ .layers-node-text {
835+ color : @project-panel-text-2 ;
836+ font-style : italic ;
837+ }
838+
817839body .layers-resizing {
818840 cursor : row-resize ;
819841 user-select : none ;
@@ -844,10 +866,6 @@ body.layers-resizing {
844866body .layers-dnd {
845867 cursor : grabbing ;
846868 user-select : none ;
847-
848- .layers-node-grip {
849- cursor : grabbing ;
850- }
851869}
852870
853871body .layers-dnd-invalid {
@@ -860,6 +878,7 @@ body.layers-dnd-invalid {
860878 display : flex ;
861879 align-items : center ;
862880 gap : 5px ;
881+ max-width : 260px ;
863882 padding : 2px 8px 2px 6px ;
864883 border : 1px solid rgba (107 , 158 , 255 , 0.5 );
865884 border-radius : 4px ;
@@ -875,6 +894,15 @@ body.layers-dnd-invalid {
875894 height : 14px ;
876895 display : block ;
877896 }
897+
898+ .layers-node-name ,
899+ .layers-node-tag :first-child {
900+ color : inherit ;
901+ }
902+
903+ .layers-node-tag {
904+ color : #a0a0a0 ;
905+ }
878906}
879907
880908@keyframes layers- flash- row {
0 commit comments