diff --git a/composer.json b/composer.json index 2ff94568607..bfe49f3bcf6 100644 --- a/composer.json +++ b/composer.json @@ -66,7 +66,7 @@ "sabre/http": "^5.1", "sabre/uri": "^2.3", "sabre/vobject": "^4.5", - "scssphp/scssphp": "^1.13", + "scssphp/scssphp": "^2.0", "sebastian/diff": "^6.0", "simplepie/simplepie": "^1.8", "symfony/cache": "^6.4", diff --git a/composer.lock b/composer.lock index d66fec87b2b..058573de783 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eda84a9c368abfd7fb15ba1c3c2c89f8", + "content-hash": "0ae074e8695d972fff6a5dc7486398a1", "packages": [ { "name": "apereo/phpcas", @@ -5170,41 +5170,43 @@ }, { "name": "scssphp/scssphp", - "version": "v1.13.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520" + "reference": "a70358e5e70b6a93f9bcecfcd9d3f1ec1499f7a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/63d1157457e5554edf00b0c1fabab4c1511d2520", - "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/a70358e5e70b6a93f9bcecfcd9d3f1ec1499f7a6", + "reference": "a70358e5e70b6a93f9bcecfcd9d3f1ec1499f7a6", "shasum": "" }, "require": { "ext-ctype": "*", "ext-json": "*", - "php": ">=5.6.0" + "league/uri": "^7.4", + "league/uri-interfaces": "^7.4", + "php": ">=8.1", + "scssphp/source-span": "^1.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.30" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4", - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4", + "phpunit/phpunit": "^9.5.6", "sass/sass-spec": "*", "squizlabs/php_codesniffer": "~3.5", "symfony/phpunit-bridge": "^5.1", + "symfony/var-dumper": "^6.3", "thoughtbot/bourbon": "^7.0", "twbs/bootstrap": "~5.0", "twbs/bootstrap4": "4.6.1", "zurb/foundation": "~6.7.0" }, "suggest": { - "ext-iconv": "Can be used as fallback when ext-mbstring is not available", - "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" + "ext-mbstring": "For best performance, mbstring should be installed as it is faster than the polyfill" }, - "bin": [ - "bin/pscss" - ], "type": "library", "extra": { "bamarni-bin": { @@ -5244,9 +5246,67 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.13.0" + "source": "https://github.com/scssphp/scssphp/tree/v2.0.0" + }, + "time": "2024-12-23T17:11:07+00:00" + }, + { + "name": "scssphp/source-span", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/scssphp/source-span.git", + "reference": "f08fc78765e6fb6fa8ca0573fc61b3f8860f0114" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scssphp/source-span/zipball/f08fc78765e6fb6fa8ca0573fc61b3f8860f0114", + "reference": "f08fc78765e6fb6fa8ca0573fc61b3f8860f0114", + "shasum": "" + }, + "require": { + "league/uri": "^7.4", + "league/uri-interfaces": "^7.4", + "php": ">=8.1" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpunit/phpunit": "^9.5.6", + "squizlabs/php_codesniffer": "~3.5", + "symfony/phpunit-bridge": "^5.1", + "symfony/var-dumper": "^6.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "SourceSpan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "homepage": "https://github.com/stof" + } + ], + "description": "Provides a representation for source code locations and spans.", + "keywords": [ + "parsing" + ], + "support": { + "issues": "https://github.com/scssphp/source-span/issues", + "source": "https://github.com/scssphp/source-span/tree/v1.0.0" }, - "time": "2024-08-17T21:02:11+00:00" + "time": "2024-12-09T23:08:15+00:00" }, { "name": "sebastian/diff", diff --git a/css/helpdesk_home.scss b/css/helpdesk_home.scss index 2c0eb83a16c..d039343baa8 100644 --- a/css/helpdesk_home.scss +++ b/css/helpdesk_home.scss @@ -102,8 +102,8 @@ header { .search-banner { background: - url('/pics/serfservice-portal-header-1.svg') no-repeat bottom right, - url('/pics/serfservice-portal-header-2.svg') no-repeat bottom left + url('../pics/serfservice-portal-header-1.svg') no-repeat bottom right, + url('../pics/serfservice-portal-header-2.svg') no-repeat bottom left ; background-color: var(--glpi-helpdesk-header); padding-top:150px; diff --git a/css/includes/components/_racks.scss b/css/includes/components/_racks.scss index 9b8930c7e3a..6832c0c4492 100644 --- a/css/includes/components/_racks.scss +++ b/css/includes/components/_racks.scss @@ -428,6 +428,18 @@ ul.indexes { } .grid-rack { + width: 217px; + background: + var(--tblr-body-bg) repeating-linear-gradient( + transparent, + transparent 21px, + var(--tblr-bg-surface-tertiary) 21px, + var(--tblr-bg-surface-tertiary) 42px + ); + z-index: 1; + border: 1px solid var(--tblr-border-color); + float: left; + *, ::before, ::after { @@ -441,18 +453,6 @@ ul.indexes { width: 100%; } } - - width: 217px; - background: - var(--tblr-body-bg) repeating-linear-gradient( - transparent, - transparent 21px, - var(--tblr-bg-surface-tertiary) 21px, - var(--tblr-bg-surface-tertiary) 42px - ); - z-index: 1; - border: 1px solid var(--tblr-border-color); - float: left; } .virtual_pdu_space { diff --git a/css/includes/components/_select2.scss b/css/includes/components/_select2.scss index dd38ef826ee..0729c42d310 100644 --- a/css/includes/components/_select2.scss +++ b/css/includes/components/_select2.scss @@ -112,13 +112,13 @@ min-height: $input-height; .form-select-sm + & { - @include font-size($input-font-size-sm * 0.875); + @include font-size(calc(#{$input-font-size-sm} * 0.875)); min-height: $input-height-sm; } .form-select-lg + & { - @include font-size($input-font-size-lg * 0.875); + @include font-size(calc(#{$input-font-size-lg} * 0.875)); min-height: $input-height-lg; } diff --git a/css/legacy/includes/_styles.scss b/css/legacy/includes/_styles.scss index 54fdc3853ad..b31b49cf7c0 100644 --- a/css/legacy/includes/_styles.scss +++ b/css/legacy/includes/_styles.scss @@ -197,11 +197,11 @@ } &.disabled { + opacity: .3; + &:hover { opacity: .3; } - - opacity: .3; } } diff --git a/css/standalone/gridstack-grids.scss b/css/standalone/gridstack-grids.scss deleted file mode 100644 index a3158d55af9..00000000000 --- a/css/standalone/gridstack-grids.scss +++ /dev/null @@ -1,72 +0,0 @@ -/*! - * --------------------------------------------------------------------- - * - * GLPI - Gestionnaire Libre de Parc Informatique - * - * http://glpi-project.org - * - * @copyright 2015-2025 Teclib' and contributors. - * @copyright 2003-2014 by the INDEPNET Development Team. - * @licence https://www.gnu.org/licenses/gpl-3.0.html - * - * --------------------------------------------------------------------- - * - * LICENSE - * - * This file is part of GLPI. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * --------------------------------------------------------------------- - */ - -/** - * default to generate [2-11] columns as 1 (oneColumnMode) and 12 (default) are in the main css - * Copyright (c) 2021 Alain Dumesny - see GridStack root license - */ - -$gridstack-columns-start: 2 !default; -$gridstack-columns: 100 !default; - -@mixin grid-stack-items($columns) { - .grid-stack.grid-stack-#{$columns} { - > .grid-stack-item { - min-width: 100% / $columns; - - @for $i from 1 through $columns { - &[gs-w="#{$i}"] { - width: (100% / $columns) * $i; - } - &[gs-x="#{$i}"] { - left: (100% / $columns) * $i; - } - &[gs-min-w="#{$i}"] { - min-width: (100% / $columns) * $i; - } - &[gs-max-w="#{$i}"] { - max-width: (100% / $columns) * $i; - } - } - } - } -} - -@for $j from $gridstack-columns-start through $gridstack-columns { - @include grid-stack-items($j); -} - -/* Fix responsive width */ -.grid-stack.grid-stack-1 > .grid-stack-item { - width: 100% !important; -} diff --git a/front/css.php b/front/css.php index e87e4406dd3..0ba64f1484f 100644 --- a/front/css.php +++ b/front/css.php @@ -36,9 +36,9 @@ use Glpi\Application\ErrorHandler; use Glpi\UI\ThemeManager; -// Main CSS compilation requires about 140MB of memory on PHP 7.4 (110MB on PHP 8.2). +// Main CSS compilation requires about 70MB of memory. // Ensure to have enough memory to not reach memory limit. -$max_memory = 192; +$max_memory = 96; if (Toolbox::getMemoryLimit() < ($max_memory * 1024 * 1024)) { ini_set('memory_limit', sprintf('%dM', $max_memory)); } diff --git a/src/Html.php b/src/Html.php index 9a8cca76d8e..688697afe36 100644 --- a/src/Html.php +++ b/src/Html.php @@ -1130,7 +1130,6 @@ public static function includeHeader( if (in_array('gridstack', $jslibs)) { $tpl_vars['css_files'][] = ['path' => 'lib/gridstack.css']; - $tpl_vars['css_files'][] = ['path' => 'css/standalone/gridstack-grids.scss']; Html::requireJs('gridstack'); } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 440f42402e0..053a132a9c4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -82,7 +82,6 @@ include_once __DIR__ . '/GLPITestCase.php'; include_once __DIR__ . '/DbTestCase.php'; include_once __DIR__ . '/FrontBaseClass.php'; -include_once __DIR__ . '/HLAPITestCase.php'; include_once __DIR__ . '/RuleBuilder.php'; include_once __DIR__ . '/functional/Glpi/ContentTemplates/Parameters/AbstractParameters.php';