[Koha-bugs] [Bug 34392] Run automated Stylelint fixes on staff CSS

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 19 15:39:19 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34392

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #154699|0                           |1
        is obsolete|                            |

--- Comment #5 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 155897
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155897&action=edit
Bug 34392: Run automated Stylelint fixes on staff CSS

This patch corrects errors raised by the new stylelint configuration in
staff-global.scss. Many of the fixes were made automatically by using
the "--fix" option:

npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
--fix

Some examples of errors found:

    - Expected single space after ":"
    - Expected single space after "("
    - Expected single space before ")"
    - Expected empty line before comment
    - Expected no more than 1 empty line
    - Expected a trailing semicolon

Manual fixes include replacing named colors with hex codes, combining
duplicate selectors, removing empty blocks, etc.

Some warnings remain: "Unexpected !important" requires more than a
quick fix, if we should choose to address them.

To test, apply the patch and rebuild the staff interface CSS:
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client

The changes affect CSS all around the staff interface, but there should
be no visible results of the patch. Everything should look correct.

The stylelint check should return only warnings about "!important"

npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss

Signed-off-by: Sam Lau <samalau at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list