Make WordPress Core

Changeset 63988


Ignore:
Timestamp:
09/29/2026 08:17:11 AM (3 weeks ago)
Author:
afercia
Message:

Administration: Fix the CSS Coding Standards in nav-menus.css.

Lints the src/wp-admin/css/nav-menus.css file.
Part of the ongoing effort to lint all the admin CSS files.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/13145

See #65898.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/nav-menus.css

    r62097 r63988  
    1 /* nav-menu */
    2 
    31/* @todo: determine if this is truly for nav menus only */
    42.no-js #message {
    … …  
    6866#menu-settings-column .taxonomydiv div.tabs-panel {
    6967        /* Allow space for content after tab panels in nav menu editor. */
    70         max-height: calc( 100% - 75px );
     68        max-height: calc(100% - 75px);
    7169        height: 100%;
    7270}
    … …  
    125123#nav-menu-bulk-actions-bottom {
    126124        margin: 1em 0;
    127         margin: calc( 1em + 9px ) 0;
     125        margin: calc(1em + 9px) 0;
    128126}
    129127
    … …  
    199197        font-size: inherit;
    200198        border: 0;
    201         line-height: 2.1em;
     199        line-height: 2.1;
    202200        background: none;
    203201        cursor: pointer;
    … …  
    386384
    387385.customlinkdiv p {
    388         margin-top: 0
     386        margin-top: 0;
    389387}
    390388
    … …  
    413411        margin-left: 20px;
    414412        margin-top: 5px;
    415 }
    416 
    417 .button.right, .button-secondary.right, .button-primary.right {
     413        cursor: pointer;
     414}
     415
     416.button.right,
     417.button-secondary.right,
     418.button-primary.right {
    418419        float: right;
    419420}
    … …  
    429430
    430431.button-controls {
     432        display: flex;
     433        align-items: center;
     434        justify-content: space-between;
    431435        clear: both;
    432436        margin: 10px 0;
    … …  
    517521}
    518522
    519 .menu-item-title input[type=checkbox] {
     523.menu-item-title input[type="checkbox"] {
    520524        display: inline-block;
    521525        margin-top: -4px;
    … …  
    563567        min-height: 20px;
    564568        max-width: 382px;
    565         line-height: 2.30769230;
     569        line-height: 2.3076923;
    566570        overflow: hidden;
    567571        word-wrap: break-word;
    … …  
    633637
    634638/* WARNING: The factor of 30px is hardcoded into the nav-menus JavaScript. */
    635 .menu-item-depth-0 { margin-left: 0; }
    636 .menu-item-depth-1 { margin-left: 30px; }
    637 .menu-item-depth-2 { margin-left: 60px; }
    638 .menu-item-depth-3 { margin-left: 90px; }
    639 .menu-item-depth-4 { margin-left: 120px; }
    640 .menu-item-depth-5 { margin-left: 150px; }
    641 .menu-item-depth-6 { margin-left: 180px; }
    642 .menu-item-depth-7 { margin-left: 210px; }
    643 .menu-item-depth-8 { margin-left: 240px; }
    644 .menu-item-depth-9 { margin-left: 270px; }
    645 .menu-item-depth-10 { margin-left: 300px; }
    646 .menu-item-depth-11 { margin-left: 330px; }
    647 
    648 .menu-item-depth-0 .menu-item-transport { margin-left: 0; }
    649 .menu-item-depth-1 .menu-item-transport { margin-left: -30px; }
    650 .menu-item-depth-2 .menu-item-transport { margin-left: -60px; }
    651 .menu-item-depth-3 .menu-item-transport { margin-left: -90px; }
    652 .menu-item-depth-4 .menu-item-transport { margin-left: -120px; }
    653 .menu-item-depth-5 .menu-item-transport { margin-left: -150px; }
    654 .menu-item-depth-6 .menu-item-transport { margin-left: -180px; }
    655 .menu-item-depth-7 .menu-item-transport { margin-left: -210px; }
    656 .menu-item-depth-8 .menu-item-transport { margin-left: -240px; }
    657 .menu-item-depth-9 .menu-item-transport { margin-left: -270px; }
    658 .menu-item-depth-10 .menu-item-transport { margin-left: -300px; }
    659 .menu-item-depth-11 .menu-item-transport { margin-left: -330px; }
    660 
    661 body.menu-max-depth-0 { min-width: 950px !important; }
    662 body.menu-max-depth-1 { min-width: 980px !important; }
    663 body.menu-max-depth-2 { min-width: 1010px !important; }
    664 body.menu-max-depth-3 { min-width: 1040px !important; }
    665 body.menu-max-depth-4 { min-width: 1070px !important; }
    666 body.menu-max-depth-5 { min-width: 1100px !important; }
    667 body.menu-max-depth-6 { min-width: 1130px !important; }
    668 body.menu-max-depth-7 { min-width: 1160px !important; }
    669 body.menu-max-depth-8 { min-width: 1190px !important; }
    670 body.menu-max-depth-9 { min-width: 1220px !important; }
    671 body.menu-max-depth-10 { min-width: 1250px !important; }
    672 body.menu-max-depth-11 { min-width: 1280px !important; }
     639.menu-item-depth-0 {
     640        margin-left: 0;
     641}
     642
     643.menu-item-depth-1 {
     644        margin-left: 30px;
     645}
     646
     647.menu-item-depth-2 {
     648        margin-left: 60px;
     649}
     650
     651.menu-item-depth-3 {
     652        margin-left: 90px;
     653}
     654
     655.menu-item-depth-4 {
     656        margin-left: 120px;
     657}
     658
     659.menu-item-depth-5 {
     660        margin-left: 150px;
     661}
     662
     663.menu-item-depth-6 {
     664        margin-left: 180px;
     665}
     666
     667.menu-item-depth-7 {
     668        margin-left: 210px;
     669}
     670
     671.menu-item-depth-8 {
     672        margin-left: 240px;
     673}
     674
     675.menu-item-depth-9 {
     676        margin-left: 270px;
     677}
     678
     679.menu-item-depth-10 {
     680        margin-left: 300px;
     681}
     682
     683.menu-item-depth-11 {
     684        margin-left: 330px;
     685}
     686
     687.menu-item-depth-0 .menu-item-transport {
     688        margin-left: 0;
     689}
     690
     691.menu-item-depth-1 .menu-item-transport {
     692        margin-left: -30px;
     693}
     694
     695.menu-item-depth-2 .menu-item-transport {
     696        margin-left: -60px;
     697}
     698
     699.menu-item-depth-3 .menu-item-transport {
     700        margin-left: -90px;
     701}
     702
     703.menu-item-depth-4 .menu-item-transport {
     704        margin-left: -120px;
     705}
     706
     707.menu-item-depth-5 .menu-item-transport {
     708        margin-left: -150px;
     709}
     710
     711.menu-item-depth-6 .menu-item-transport {
     712        margin-left: -180px;
     713}
     714
     715.menu-item-depth-7 .menu-item-transport {
     716        margin-left: -210px;
     717}
     718
     719.menu-item-depth-8 .menu-item-transport {
     720        margin-left: -240px;
     721}
     722
     723.menu-item-depth-9 .menu-item-transport {
     724        margin-left: -270px;
     725}
     726
     727.menu-item-depth-10 .menu-item-transport {
     728        margin-left: -300px;
     729}
     730
     731.menu-item-depth-11 .menu-item-transport {
     732        margin-left: -330px;
     733}
     734
     735body.menu-max-depth-0 {
     736        min-width: 950px !important;
     737}
     738
     739body.menu-max-depth-1 {
     740        min-width: 980px !important;
     741}
     742
     743body.menu-max-depth-2 {
     744        min-width: 1010px !important;
     745}
     746
     747body.menu-max-depth-3 {
     748        min-width: 1040px !important;
     749}
     750
     751body.menu-max-depth-4 {
     752        min-width: 1070px !important;
     753}
     754
     755body.menu-max-depth-5 {
     756        min-width: 1100px !important;
     757}
     758
     759body.menu-max-depth-6 {
     760        min-width: 1130px !important;
     761}
     762
     763body.menu-max-depth-7 {
     764        min-width: 1160px !important;
     765}
     766
     767body.menu-max-depth-8 {
     768        min-width: 1190px !important;
     769}
     770
     771body.menu-max-depth-9 {
     772        min-width: 1220px !important;
     773}
     774
     775body.menu-max-depth-10 {
     776        min-width: 1250px !important;
     777}
     778
     779body.menu-max-depth-11 {
     780        min-width: 1280px !important;
     781}
    673782
    674783/* Menu item controls */
    … …  
    731840}
    732841
    733 .nav-menus-php .item-edit:before {
     842.nav-menus-php .item-edit::before {
    734843        margin-top: 10px;
    735844        margin-left: 4px;
    … …  
    739848}
    740849
    741 .no-js.nav-menus-php .item-edit:before {
    742         display: none;
    743 }
    744 
    745 .rtl .nav-menus-php .item-edit:before {
     850.no-js.nav-menus-php .item-edit::before {
     851        display: none;
     852}
     853
     854.rtl .nav-menus-php .item-edit::before {
    746855        text-indent: 1px; /* account for the dashicon alignment */
    747856}
    … …  
    751860}
    752861
    753 .nav-menus-php .item-edit:focus:before {
     862.nav-menus-php .item-edit:focus::before {
    754863        box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
    755864        /* Only visible in Windows High Contrast mode */
    … …  
    797906
    798907.add-menu-item-pagelinks {
    799         margin: .5em -10px;
     908        margin: 0.5em -10px;
    800909        text-align: center;
    801910}
    … …  
    842951}
    843952
    844 #cancel-save {
    845         cursor: pointer;
    846 }
    847 
    848953/* Major/minor publishing actions (classes) */
    849954.nav-menus-php .major-publishing-actions {
    … …  
    868973}
    869974
    870 .button-controls {
    871         display: flex;
    872         align-items: center;
    873         justify-content: space-between;
    874 }
    875 
    876975.button-controls-customlinkdiv {
    877976        justify-content: flex-end;
    … …  
    9351034
    9361035        .nav-menus-php .menu-name-label.howto span {
    937                 margin-top: 13px
     1036                margin-top: 13px;
    9381037        }
    9391038
    … …  
    10081107
    10091108@media only screen and (min-width: 783px) {
    1010     @supports (position: sticky) and (scroll-margin-bottom: 130px) {
    1011 
     1109        @supports (position: sticky) and (scroll-margin-bottom: 130px) {
    10121110                #nav-menu-footer {
    1013                 position: sticky;
    1014                                 bottom: 0;
    1015                                 z-index: 10;
    1016                                 box-shadow: 0 -1px 0 0 #ddd;
    1017         }
    1018 
    1019         #save_menu_header {
    1020                 display: none;
    1021         }
    1022     }
     1111                        position: sticky;
     1112                        bottom: 0;
     1113                        z-index: 10;
     1114                        box-shadow: 0 -1px 0 0 #ddd;
     1115                }
     1116
     1117                /* stylelint-disable-next-line selector-id-pattern -- This ID selector uses a single underscore but cannot be changed because of backward compatibility reasons. */
     1118                #save_menu_header {
     1119                        display: none;
     1120                }
     1121        }
    10231122}
    10241123
Note: See TracChangeset for help on using the changeset viewer.