From 18d8866bc14305dfe175d02c231a6742a98ffabc Mon Sep 17 00:00:00 2001 From: Bart den Hoed Date: Wed, 4 Sep 2024 14:43:45 +0200 Subject: [PATCH 1/9] First release of the snippets repository, based on the outcome of MoodleMootDACH and amended by the Boost Union maintainers afterwards --- README.md | 77 +++++++++++++++++++++++++++++++++++- boilerplate/boilerplate.scss | 15 +++++++ snippets/course/.gitkeep | 0 snippets/dashboard/.gitkeep | 0 snippets/global/.gitkeep | 0 5 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 boilerplate/boilerplate.scss create mode 100644 snippets/course/.gitkeep create mode 100644 snippets/dashboard/.gitkeep create mode 100644 snippets/global/.gitkeep diff --git a/README.md b/README.md index 9000686..bf3c860 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,75 @@ -# moodle-theme_boost_union_snippets -Boost Union CSS snippets +# SCSS snippets repository for Moodle Boost Union Theme + +## About + +The [Boost Union](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union) theme for Moodle allows administrators to enable / use SCSS snippets to enhance and style their particular Moodle instance. + +The theme ships with a [small default set of SCSS snippets](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/tree/main/snippets/builtin). + +In addition to these, the SCSS snippets in this repository are meant to be uploaded in the Boost Union SCSS snippets setting page by the administrator. Furthermore, a way to automatically download and include these SCSS snippets is on Boost Union's roadmap. + +## SCSS snippet structure + +### Components of a SCSS snippet + +A SCSS snippet consists of two components: + +- A simple plaintext SCSS file (.scss) +- An optional image file, (.webp, .png, .jpg, .jpeg, .gif - ideally widescreen aspect ratio) + +Both files must share the same arbitrary filename and just differ by their file suffix. + +### SCSS snippet file metadata + +A SCSS snippet file contains, beside the necessary SCSS code, several metadata fields which allow us to categorize and manage the pile of SCSS snippets. + +These are attributes that are defined to be added at the top of the SCSS file: + +- `Snippet Title`: The title of the snippet which will be shown in the snippet list in Boost Union +- `Scope`: A tag which highlights the scope of the snippet (see below) +- `Goal`: A tag which highlights the goal of the snippet (see below) +- `Description`: A few sentences which describe the snippet for humans +- `Creator`: The creator of the snippet which will be shown in the snippet list in Boost Union +- `Tested on`: A short information on which Moodle version and with which browser the snippet was tested +- `Usage note`: An (optional) usage note to be shown in the snippet list in Boost Union + +#### List of scopes + +Each particular snippet should have a `Scope` tag and thereby be assigned to a single particular scope. The scope does not have a technical impact, it is rather an important metadata for structuring the pile of available snippets: + +- `global`: These snippets affect the entire site +- `course`: These snippets affect only the course context +- `dashboard`: These snippets affect only the dashboard of a user + +The list of scopes is not necessarily limited to these existing scopes, additional scopes can be added in the future. + +#### List of goals + +Each particular snippet should have a `Goal` tag and thereby be assigned to a single particular goal. The goal does not have a technical impact as well, it is a metadata for structuring the pile of available snippets as well: + +- `eyecandy`: These snippets focus on the (visual) styling of Moodle, especially to deviate from Moodle's and Bootstrap's default appearance +- `bugfix`: These snippets fix Moodle CSS bugs and glitches, ideally temporarily until Moodle core fixes it itself +- `accessibility`: These snippets try to Moodle more accessible +- `easeofuse`: These snippets try to make Moodle easier to use +- `devsonly`: These snippets add styling that mainly help developers who develop in Moodle + +The list of goals is not necessarily limited to these existing goals, additional goals can be added in the future. + +## Repository structure + +This repository is, for now, structured by snippet goals with each goal having a top level folder. Within this folder, all snippets are located on the same level + +## Using the community snippets in Boost Union + +You can use all of these snippets here directly in Boost Union: + +* Download this repository as ZIP file +* In your Moodle instance, go to Site administration -> Appearance -> Boost Union -> SCSS snippets -> Settings +* On this settings page, enable the 'Enable uploaded snippets' setting +* Upload the ZIP file into the 'Upload snippets' setting and save the settings page. Upon saving, Boost Union will automatically unpack the ZIP file. +* Go to Site administration -> Appearance -> Boost Union -> SCSS snippets -> Overview +* Enable the particular SCSS snippets which you would like to use + +## Create and contribute your own snippet + +You are welcome to create your own SCSS snippet based on the [boilerplate](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets/tree/main/boilerplate) and submit your new SCSS snippet as a pull request to this repository. \ No newline at end of file diff --git a/boilerplate/boilerplate.scss b/boilerplate/boilerplate.scss new file mode 100644 index 0000000..fbf9c80 --- /dev/null +++ b/boilerplate/boilerplate.scss @@ -0,0 +1,15 @@ +/** + * Snippet Title: + * Scope: + * Goal: + * Description: + * Creator: + * Tested on: + * Usage note: + * + * @copyright + * @author + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +// diff --git a/snippets/course/.gitkeep b/snippets/course/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/snippets/dashboard/.gitkeep b/snippets/dashboard/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/snippets/global/.gitkeep b/snippets/global/.gitkeep new file mode 100644 index 0000000..e69de29 From a3664a635b2574ddca8b0b85637982c5aab6e9b1 Mon Sep 17 00:00:00 2001 From: Andre Menrath Date: Fri, 4 Jul 2025 10:30:48 +0200 Subject: [PATCH 2/9] add: snippet course search box to above content on startpage --- .../course_search_above_startpage_content.css | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 snippets/easeofuse/course_search_above_startpage_content.css diff --git a/snippets/easeofuse/course_search_above_startpage_content.css b/snippets/easeofuse/course_search_above_startpage_content.css new file mode 100644 index 0000000..b705da0 --- /dev/null +++ b/snippets/easeofuse/course_search_above_startpage_content.css @@ -0,0 +1,35 @@ +/** + * Snippet Title: Move course search box to top on startpage. + * Scope: startpage + * Goal: easeofuse + * Description: The course search box on the start page is very important to many, but when the content of the start page course is very long it is positioned quite unprominent. This snippet alawys puts it on top. + * Creator: André Menrath + * Tested on: Moodle 4.4+ + * Usage note: The course search box has to be enabled in the frontpageloggedin site admin setting. + * + * @copyright 2025 University of Graz + * @author André Menrath + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +#page-site-index #region-main > div { + display: flex; + flex-direction: column; + width: 100%; + flex-wrap: nowrap; +} + +/** The course search box */ +#page-site-index #region-main > div > div.box.py-3.d-flex.justify-content-center { + order: 1; +} + +/** The course content*/ +#page-site-index #region-main > div > div.course-content { + order: 2; +} + +/** All other stuff */ +#page-site-index #region-main > div > * { + order: 3; +} From c26559d48f58a938f425bcf569b9520bd81eb2ce Mon Sep 17 00:00:00 2001 From: Andre Menrath Date: Mon, 7 Jul 2025 08:26:41 +0200 Subject: [PATCH 3/9] rebase --- README.md | 3 ++- boilerplate/boilerplate.scss | 3 ++- snippets/course/.gitkeep | 0 snippets/dashboard/.gitkeep | 0 snippets/global/.gitkeep | 0 5 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 snippets/course/.gitkeep delete mode 100644 snippets/dashboard/.gitkeep delete mode 100644 snippets/global/.gitkeep diff --git a/README.md b/README.md index bf3c860..6b15cdf 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ These are attributes that are defined to be added at the top of the SCSS file: - `Description`: A few sentences which describe the snippet for humans - `Creator`: The creator of the snippet which will be shown in the snippet list in Boost Union - `Tested on`: A short information on which Moodle version and with which browser the snippet was tested -- `Usage note`: An (optional) usage note to be shown in the snippet list in Boost Union +- `Tracker issue`: (Optional) The Moodle tracker issue number (MDL-xxxxx) where the bug / glitch / goal which is solved by the SCSS snippet was reported upstream +- `Usage note`: (Optional) A usage note to be shown in the snippet list in Boost Union #### List of scopes diff --git a/boilerplate/boilerplate.scss b/boilerplate/boilerplate.scss index fbf9c80..ba078e6 100644 --- a/boilerplate/boilerplate.scss +++ b/boilerplate/boilerplate.scss @@ -4,6 +4,7 @@ * Goal: * Description: * Creator: + * Tracker issue: * Tested on: * Usage note: * @@ -12,4 +13,4 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -// +// \ No newline at end of file diff --git a/snippets/course/.gitkeep b/snippets/course/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/snippets/dashboard/.gitkeep b/snippets/dashboard/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/snippets/global/.gitkeep b/snippets/global/.gitkeep deleted file mode 100644 index e69de29..0000000 From b97ed60c50606ef36892454d6bde81d1d49ef68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= <99024746+Menrath@users.noreply.github.com> Date: Tue, 8 Jul 2025 08:22:05 +0200 Subject: [PATCH 4/9] Update boilerplate.scss --- boilerplate/boilerplate.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boilerplate/boilerplate.scss b/boilerplate/boilerplate.scss index ba078e6..d8286c0 100644 --- a/boilerplate/boilerplate.scss +++ b/boilerplate/boilerplate.scss @@ -13,4 +13,4 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -// \ No newline at end of file +// From 178560b87608012193f182c0a0c3e2425f9dc5ba Mon Sep 17 00:00:00 2001 From: Andre Menrath Date: Wed, 9 Jul 2025 11:52:13 +0200 Subject: [PATCH 5/9] fix: must use scss file --- ...age_content.css => course_search_above_startpage_content.scss} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename snippets/easeofuse/{course_search_above_startpage_content.css => course_search_above_startpage_content.scss} (100%) diff --git a/snippets/easeofuse/course_search_above_startpage_content.css b/snippets/easeofuse/course_search_above_startpage_content.scss similarity index 100% rename from snippets/easeofuse/course_search_above_startpage_content.css rename to snippets/easeofuse/course_search_above_startpage_content.scss From 96fc2df2cb8d941f62b507dea676b6fdf0fbb753 Mon Sep 17 00:00:00 2001 From: Andre Menrath Date: Wed, 9 Jul 2025 11:54:14 +0200 Subject: [PATCH 6/9] change: scope to dashboard --- snippets/easeofuse/course_search_above_startpage_content.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/easeofuse/course_search_above_startpage_content.scss b/snippets/easeofuse/course_search_above_startpage_content.scss index b705da0..405f4cd 100644 --- a/snippets/easeofuse/course_search_above_startpage_content.scss +++ b/snippets/easeofuse/course_search_above_startpage_content.scss @@ -1,6 +1,6 @@ /** * Snippet Title: Move course search box to top on startpage. - * Scope: startpage + * Scope: dashboard * Goal: easeofuse * Description: The course search box on the start page is very important to many, but when the content of the start page course is very long it is positioned quite unprominent. This snippet alawys puts it on top. * Creator: André Menrath From 49e5c8cba28722a3972eb2c696cef4efecba3541 Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Mon, 21 Jul 2025 14:09:08 +0200 Subject: [PATCH 7/9] Review changes --- README.md | 1 + .../course_search_above_sitehome_content.scss | 36 ++++++++++++++++++ .../course_search_above_sitehome_content.webp | Bin 0 -> 17158 bytes ...course_search_above_startpage_content.scss | 35 ----------------- 4 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 snippets/easeofuse/course_search_above_sitehome_content.scss create mode 100644 snippets/easeofuse/course_search_above_sitehome_content.webp delete mode 100644 snippets/easeofuse/course_search_above_startpage_content.scss diff --git a/README.md b/README.md index 6b15cdf..d018b0e 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Each particular snippet should have a `Scope` tag and thereby be assigned to a s - `global`: These snippets affect the entire site - `course`: These snippets affect only the course context - `dashboard`: These snippets affect only the dashboard of a user +- `sitehome`: These snippets affect only the site home page of site The list of scopes is not necessarily limited to these existing scopes, additional scopes can be added in the future. diff --git a/snippets/easeofuse/course_search_above_sitehome_content.scss b/snippets/easeofuse/course_search_above_sitehome_content.scss new file mode 100644 index 0000000..f5bc39c --- /dev/null +++ b/snippets/easeofuse/course_search_above_sitehome_content.scss @@ -0,0 +1,36 @@ +/** + * Snippet Title: Move course search box to top on site home + * Scope: sitehome + * Goal: easeofuse + * Description: The course search box on site home is very important to many users. But when existing content on site home is very long, it is positioned quite unprominent. This snippet always puts the course search box on top on site home. + * Creator: André Menrath + * Tested on: Moodle 5.0, Firefox for Mac + * Usage note: For this snippet to have any effect, the course search box has to be enabled in the frontpageloggedin site admin setting. + * + * @copyright 2025 University of Graz + * @author André Menrath + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/* Make all site home content a flex container. This allows us to order the elements inside the container. */ +#page-site-index #region-main > div { + display: flex; + flex-direction: column; + width: 100%; + flex-wrap: nowrap; +} + +/* The course search box */ +#page-site-index #region-main > div > div.box:has(.simplesearchform) { + order: 1; +} + +/* The course content*/ +#page-site-index #region-main > div > div.course-content { + order: 2; +} + +/* All other stuff */ +#page-site-index #region-main > div > * { + order: 3; +} diff --git a/snippets/easeofuse/course_search_above_sitehome_content.webp b/snippets/easeofuse/course_search_above_sitehome_content.webp new file mode 100644 index 0000000000000000000000000000000000000000..f8beadbf51ce7b3eac541768a06beaa49f65b170 GIT binary patch literal 17158 zcmeIYV{|6n()fMFwr$(CF~P){*tYFVFyX|uCU!D0C$`Or?c}=tbIx=0V7*`8FZW*E zy{oIMt9So)Rdugk{aH?08Ym6`Xi15yXsYmP!vg>S*gxxU2*3gu;E#rMj~xK0g9OU~ zqd$RI1QW(X3>PPZWLJfU1Q;_hZG+ys-mi5ZE*&Xc!wv69mg+!H*#@FL!#)VpU?5Pb za>hI8ek|EGyir7m*!g0)&j9YlbZmR1;mZ-|R%AuQuBY>T2$TYXxzRdo{mo*8GG}<( zvkbE7{OTPB^!zvjroE7OvD}b6h|KsF0f#>FfSzYCqcC@Y=eg;*BO+^{U%oJb0>C>^ z@-oh2mYFluz<^2pO-Ja=gx ztdzvr{@dwDmYQ-HdBJs|fj6h^U@S4tRX9}rQ~_0tuO=!t{vNt4#-Tl>j!`orM6)#5 zkS%^P#h$tl-Jmd}>wYfeK&rK}1@-@M^>Fj?U=Zr{eujjq)$Aw+zKKKnuo%AiGQn}w z{sOy&GVjAeBMMM>1tvh{j$zv1YuQ*|hp7v9i**0+ZsvRzrzbHa*%a&z*`(``d+J}7 zh1Xb9M>~UCPy3>>8P~wXP>JFUCjUaUy&?L!Th8+d6|*);|6>q};UF#00JVa77x{qo z)cQL2;=y#XqO2cH<@Fi(T7R@KzYAOL?-%H=efNJ{Z(CDvEz^$-3#B&xvI_tIwyv7h zKAxLNPJuUxFGUw=I{iTsclO23(QUBy(e&HlOAucZ5+LVLn$GjPb_#D!w~SU6${(Kkd|9OjhpRc~UwO5mlNKINp^E2DZvdy~cip8tr{{E*@*f}@w`pu8LA{@y7k0|&L zm(TM2o5`o2k=dsD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V$7Jam}; zi7hd#W?Y$9brs_(z^6qD%#Hmpcd^YzpDE4LQgTCbVfRof{`aHM$}?zi8R5kyPsQjq za|jCXR*T@RxMjvOojDz%60BERxX4rJOxw~-S!9Nj4T(8GmQl_36G>iTzd}9ZUV&Ui zj`(}>g!p7m*bV_=*aE=#OkzPT)(27Rf{0(IGy1lYqww|EIC~QlYJd7L=UnlKi6t48 zvFPgCsD?NEQC?x81MA2r#5*C>IYQi1W>g9x(kF!|hF;wbcDD?=q(94zNOL_^cY5C1 zO42r$HfzB-ttOP|7f-}m=1d3h1#akslaN10xaBocy73J3+3VHf3CF)3TO3AnSe^n`s2wR@d>`fmufZ2N)IAaw$$Gfodr68cVSMJT1En82QPl+ zXXz5+GO^`sqWFg-SJN6o;sIe$V$8CIR^py;>&(=Ms1oefavSR0dLfG}p8zUWHzb@+ z7(DoIm5LM?t%x86bL{&xvVgl_pRm0J;uhD_K@32sysSq^ zXu>CuXH`(wqrh5k>l!@gC7XZ6KE_9MVn*1ELqWKr$6(<+6Vu%f4&1O(`5}O=QyZq{ z3cG)SloY{nK2lU8_0CP1YgBDU9Du%R?MyY4&(kYyDBW$`G4Uv5!4gwdgK1GvyTp=i z*6`J1cFc+#u0~ZRPE&7*0)IZQQ#`fJqd+?2DzgsT{5DS*h2$r`%D? z5HITifyxK(`OH)98KqJ1-e-Bg;bRW9OK{ik=6jnf7rYH z>HpSb|EzyJ{iBCT003bA>_M`!v$G|F{g(^|4gtvjr=E?KH6QHX9`nKf=@H^2AL5@f z*kbWNNBqaxU+pgfe-ZeLz+VLZBJdZ1zX<$A;4cDy5%`P1Uj+Ul@E3vqN#Oqh+^Vw& literal 0 HcmV?d00001 diff --git a/snippets/easeofuse/course_search_above_startpage_content.scss b/snippets/easeofuse/course_search_above_startpage_content.scss deleted file mode 100644 index 405f4cd..0000000 --- a/snippets/easeofuse/course_search_above_startpage_content.scss +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Snippet Title: Move course search box to top on startpage. - * Scope: dashboard - * Goal: easeofuse - * Description: The course search box on the start page is very important to many, but when the content of the start page course is very long it is positioned quite unprominent. This snippet alawys puts it on top. - * Creator: André Menrath - * Tested on: Moodle 4.4+ - * Usage note: The course search box has to be enabled in the frontpageloggedin site admin setting. - * - * @copyright 2025 University of Graz - * @author André Menrath - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -#page-site-index #region-main > div { - display: flex; - flex-direction: column; - width: 100%; - flex-wrap: nowrap; -} - -/** The course search box */ -#page-site-index #region-main > div > div.box.py-3.d-flex.justify-content-center { - order: 1; -} - -/** The course content*/ -#page-site-index #region-main > div > div.course-content { - order: 2; -} - -/** All other stuff */ -#page-site-index #region-main > div > * { - order: 3; -} From eff197ae388f3588539179cb66411f71c1860171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= <99024746+Menrath@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:45:21 +0200 Subject: [PATCH 8/9] add: ci-lint workflow (#4) --- .github/workflows/lint.yml | 30 +++++++++++ .gitignore | 2 + .stylelintrc | 107 +++++++++++++++++++++++++++++++++++++ Gruntfile.js | 26 +++++++++ package.json | 28 ++++++++++ 5 files changed, 193 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .gitignore create mode 100644 .stylelintrc create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..19fdb0c --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: SCSS Linting + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint-scss: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '22' + + - name: Install npm dependencies + run: | + npm install + + - name: Run SCSS Linting + run: | + grunt stylelint:scss \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fed401d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +package-lock.json +node_modules/ \ No newline at end of file diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 0000000..fa7a770 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,107 @@ +{ + "customSyntax": "postcss-scss", + "plugins": [ + "stylelint-csstree-validator" + ], + "rules": { + "csstree/validator": { + "syntaxExtensions": [ + "sass" + ] + }, + "at-rule-empty-line-before": [ "always", + {"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]} + ], + "at-rule-name-case": "lower", + "at-rule-name-space-after": "always-single-line", + "at-rule-no-unknown": null, # Enabled for non-scss in grunt. + "at-rule-semicolon-newline-after": "always", + "at-rule-semicolon-space-before": "never", + "block-closing-brace-newline-after": "always", + "block-closing-brace-newline-before": "always", + "block-closing-brace-space-before": "always-single-line", + "block-no-empty": true, + "block-opening-brace-newline-after": "always", + "block-opening-brace-space-after": "always-single-line", + "block-opening-brace-space-before": "always", + "color-hex-case": ["lower", { "severity": "warning" }], + "color-hex-length": ["short", { "severity": "warning" }], + "color-no-invalid-hex": true, + "declaration-bang-space-after": "never", + "declaration-bang-space-before": "always", + "declaration-block-no-duplicate-properties": true, + "declaration-block-no-shorthand-property-overrides": true, + "declaration-block-semicolon-newline-after": "always-multi-line", + "declaration-block-semicolon-space-after": "always-single-line", + "declaration-block-semicolon-space-before": "never", + "declaration-block-single-line-max-declarations": 1, + "declaration-block-trailing-semicolon": "always", + "declaration-colon-newline-after": "always-multi-line", + "declaration-colon-space-after": "always-single-line", + "declaration-colon-space-before": "never", + "declaration-no-important": null, + "font-family-no-duplicate-names": true, + "function-calc-no-unspaced-operator": true, + "function-comma-newline-after": "always-multi-line", + "function-comma-space-after": "always-single-line", + "function-comma-space-before": "never", + "function-linear-gradient-no-nonstandard-direction": true, + "function-max-empty-lines": 0, + "function-name-case": "lower", + "function-parentheses-newline-inside": "always-multi-line", + "function-parentheses-space-inside": "never-single-line", + "function-url-scheme-disallowed-list": ["data"], + "function-whitespace-after": "always", + "indentation": 4, + "keyframe-declaration-no-important": true, + "length-zero-no-unit": [true, { "severity": "warning" }], + "max-empty-lines": 2, + "max-line-length": [132, { "severity": "warning" }], + "media-feature-colon-space-after": "always", + "media-feature-colon-space-before": "never", + "media-feature-parentheses-space-inside": "never", + "media-feature-range-operator-space-after": "always", + "media-feature-range-operator-space-before": "always", + "media-query-list-comma-newline-after": "always-multi-line", + "media-query-list-comma-space-after": "always-single-line", + "media-query-list-comma-space-before": "never", + "no-empty-source": true, + "no-eol-whitespace": true, + "no-extra-semicolons": [true, { "severity": "warning" }], + "no-invalid-double-slash-comments": true, + "no-unknown-animations": true, + "property-case": "lower", + "property-no-unknown": true, + "selector-attribute-brackets-space-inside": "never", + "selector-attribute-operator-space-after": "never", + "selector-attribute-operator-space-before": "never", + "selector-combinator-space-after": "always", + "selector-combinator-space-before": "always", + "selector-list-comma-newline-after": "always", + "selector-list-comma-space-before": "never", + "selector-max-empty-lines": 0, + "selector-pseudo-class-case": "lower", + "selector-pseudo-class-no-unknown": true, + "selector-pseudo-class-parentheses-space-inside": "never", + "selector-pseudo-element-case": "lower", + "selector-pseudo-element-no-unknown": true, + "selector-type-case": "lower", + "selector-type-no-unknown": true, + "string-no-newline": true, + "time-min-milliseconds": 100, + "unit-disallowed-list": ["pt"], + "unit-case": "lower", + "unit-no-unknown": true, + "value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}], + "value-list-comma-newline-after": "always-multi-line", + "value-list-comma-space-after": "always-single-line", + "value-list-comma-space-before": "never", + }, + "overrides": [ + { + "files": ["**/yui/**/*.css"], + "rules": { + } + } + ] +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..9ded974 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,26 @@ +module.exports = function(grunt) { + // Load the plugins + grunt.loadNpmTasks('grunt-stylelint'); + + // Project configuration + grunt.initConfig({ + stylelint: { + scss: { + options: { + quietDeprecationWarnings: true, + customSyntax: 'postcss-scss', + }, + src: ['snippets/**/*.scss'] + } + }, + watch: { + scss: { + files: ['snippets/**/*.scss'], + tasks: ['stylelint:scss'] + } + } + }); + + // Register default task + grunt.registerTask('default', ['stylelint:scss']); +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..dff3cbb --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "moodle-theme_boost_union_snippets", + "version": "1.0.0", + "description": "SCSS snippets repository for Moodle Boost Union Theme", + "main": "index.js", + "scripts": { + "lint": "grunt stylelint:scss" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets.git" + }, + "keywords": [], + "author": "", + "license": "GPL-3.0", + "bugs": { + "url": "https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets/issues" + }, + "homepage": "https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_snippets#readme", + "devDependencies": { + "grunt": "^1.6.1", + "grunt-sass": "3.1.0", + "grunt-stylelint": "^0.19.0", + "postcss-scss": "^4.0.9", + "stylelint": "^15.11.0", + "stylelint-csstree-validator": "^3.0.0" + } +} From 6ddabb1504305f9fc828d741f0f814e0a8f955e3 Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Mon, 21 Jul 2025 14:14:39 +0200 Subject: [PATCH 9/9] Allow lines to be longer than 132 chars --- .stylelintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stylelintrc b/.stylelintrc index fa7a770..5185366 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -56,7 +56,7 @@ "keyframe-declaration-no-important": true, "length-zero-no-unit": [true, { "severity": "warning" }], "max-empty-lines": 2, - "max-line-length": [132, { "severity": "warning" }], + "max-line-length": null, "media-feature-colon-space-after": "always", "media-feature-colon-space-before": "never", "media-feature-parentheses-space-inside": "never",