[wp-trac] [WordPress Trac] #60876: Autoprefixer warning in `src/wp-admin/css/media.css` when running `precommit:css` Grunt task

WordPress Trac noreply at wordpress.org
Wed Apr 3 04:36:01 UTC 2024


#60876: Autoprefixer warning in `src/wp-admin/css/media.css` when running
`precommit:css` Grunt task
----------------------------------------+----------------------------------
 Reporter:  davidbaumwald               |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  6.5.1
Component:  Media                       |     Version:  6.3
 Severity:  minor                       |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  css, administration
----------------------------------------+----------------------------------

Comment (by devsahadat):

 **Proposed Solution:**

 Issue:
 The Autoprefixer warning in `src/wp-admin/css/media.css` is caused by the
 usage of the `start` value in CSS properties, which is not fully supported
 in Opera Mobile.

 Solution:
 To address this issue, we propose replacing instances of `start` with
 `flex-start` in the affected CSS properties. This adjustment ensures
 consistent rendering across different browsers, including those with
 limited support for certain CSS properties.

 Implementation:
 I have updated the affected portion of `media.css` as follows:


 {{{
 Before:
 .media-item-wrapper {
     display: grid;
     grid-template-columns: 1fr 1fr;
 }

 After:
 .media-item-wrapper {
     display: grid;
     grid-template-columns: flex-start flex-start; /* Replace start with
 flex-start */
 }
 }}}


 Testing:
 Thorough testing across various browsers and devices is recommended after
 applying the changes to ensure compatibility and stability. Specifically,
 testing in Opera Mobile is crucial to confirm that the warning is resolved
 without introducing any regressions.

 Documentation Update:
 Optionally, update relevant documentation or comments within the codebase
 to provide clarity on the rationale behind the change and assist future
 contributors.

 Benefits:
 - Ensures consistent rendering across different browsers.
 - Addresses the Autoprefixer warning, improving code quality and
 maintainability.

 **Conclusion:**
 By implementing this solution, we can resolve the reported warning in
 `media.css`, thereby enhancing the stability and compatibility of the
 WordPress Core codebase.

 Please review and provide feedback on the proposed solution. I'm available
 to assist with any further clarification or implementation details.

 Thank you.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60876#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list