Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 50 files
+0 −1 composer.json
+1 −75 composer.lock
+0 −38 composer/autoload_classmap.php
+0 −1 composer/autoload_psr4.php
+0 −43 composer/autoload_static.php
+0 −77 composer/installed.json
+2 −11 composer/installed.php
+0 −20 scssphp/scssphp/LICENSE.md
+0 −71 scssphp/scssphp/README.md
+0 −108 scssphp/scssphp/composer.json
+0 −12 scssphp/scssphp/phpcs.xml.dist
+0 −21 scssphp/scssphp/scss.inc.php
+0 −57 scssphp/scssphp/src/Base/Range.php
+0 −73 scssphp/scssphp/src/Block.php
+0 −272 scssphp/scssphp/src/Cache.php
+0 −247 scssphp/scssphp/src/Colors.php
+0 −69 scssphp/scssphp/src/CompilationResult.php
+0 −10,087 scssphp/scssphp/src/Compiler.php
+0 −77 scssphp/scssphp/src/Compiler/CachedResult.php
+0 −48 scssphp/scssphp/src/Compiler/Environment.php
+0 −24 scssphp/scssphp/src/Exception/CompilerException.php
+0 −50 scssphp/scssphp/src/Exception/ParserException.php
+0 −24 scssphp/scssphp/src/Exception/RangeException.php
+0 −7 scssphp/scssphp/src/Exception/SassException.php
+0 −32 scssphp/scssphp/src/Exception/SassScriptException.php
+0 −26 scssphp/scssphp/src/Exception/ServerException.php
+0 −364 scssphp/scssphp/src/Formatter.php
+0 −52 scssphp/scssphp/src/Formatter/Compact.php
+0 −85 scssphp/scssphp/src/Formatter/Compressed.php
+0 −87 scssphp/scssphp/src/Formatter/Crunched.php
+0 −127 scssphp/scssphp/src/Formatter/Debug.php
+0 −70 scssphp/scssphp/src/Formatter/Expanded.php
+0 −236 scssphp/scssphp/src/Formatter/Nested.php
+0 −68 scssphp/scssphp/src/Formatter/OutputBlock.php
+0 −48 scssphp/scssphp/src/Logger/LoggerInterface.php
+0 −27 scssphp/scssphp/src/Logger/QuietLogger.php
+0 −60 scssphp/scssphp/src/Logger/StreamLogger.php
+0 −43 scssphp/scssphp/src/Node.php
+0 −804 scssphp/scssphp/src/Node/Number.php
+0 −9 scssphp/scssphp/src/OutputStyle.php
+0 −4,128 scssphp/scssphp/src/Parser.php
+0 −187 scssphp/scssphp/src/SourceMap/Base64.php
+0 −151 scssphp/scssphp/src/SourceMap/Base64VLQ.php
+0 −381 scssphp/scssphp/src/SourceMap/SourceMapGenerator.php
+0 −76 scssphp/scssphp/src/Type.php
+0 −184 scssphp/scssphp/src/Util.php
+0 −77 scssphp/scssphp/src/Util/Path.php
+0 −95 scssphp/scssphp/src/ValueConverter.php
+0 −23 scssphp/scssphp/src/Version.php
+0 −84 scssphp/scssphp/src/Warn.php
7 changes: 2 additions & 5 deletions apps/theming/lib/Controller/ThemingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
use OCP\IRequest;
use OCP\ITempManager;
use OCP\IURLGenerator;
use ScssPhp\ScssPhp\Compiler;

/**
* Class ThemingController
Expand Down Expand Up @@ -317,7 +316,7 @@ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $w
}

$theme = $themes[$themeId];
$customCss = $theme->getCustomCss();
$customCss = $theme->getCustomCss("body[data-theme-$themeId]");

// Generate variables
$variables = '';
Expand All @@ -330,9 +329,7 @@ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $w
$css = ":root { $variables } " . $customCss;
} else {
// If not set, we'll rely on the body class
$compiler = new Compiler();
$compiledCss = $compiler->compileString("body[data-theme-$themeId] { $variables $customCss }");
$css = $compiledCss->getCss();;
$css = "body[data-theme-$themeId] { $variables } " . $customCss ;
}

try {
Expand Down
3 changes: 2 additions & 1 deletion apps/theming/lib/ITheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ public function getCSSVariables(): array;
* ⚠️ Warning, should be used slightly.
* Theoretically, editing the variables should be enough.
*
* @param string $prefix The css prefix for every rule. It should be appended before every rule.
* @return string
* @since 25.0.0
*/
public function getCustomCss(): string;
public function getCustomCss(string $prefix): string;
}
10 changes: 5 additions & 5 deletions apps/theming/lib/Themes/DarkHighContrastTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public function getCSSVariables(): array {
return $variables;
}

public function getCustomCss(): string {
public function getCustomCss(string $prefix): string {
return "
[class^='icon-'], [class*=' icon-'],
.action,
#appmenu li a,
.menutoggle {
$prefix [class^='icon-'], $prefix [class*=' icon-'],
$prefix .action,
$prefix #appmenu li a,
$prefix .menutoggle {
opacity: 1 !important;
}
";
Expand Down
2 changes: 1 addition & 1 deletion apps/theming/lib/Themes/DefaultTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function getCSSVariables(): array {
return $variables;
}

public function getCustomCss(): string {
public function getCustomCss(string $prefix): string {
return '';
}
}
2 changes: 1 addition & 1 deletion apps/theming/lib/Themes/DyslexiaFont.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getCSSVariables(): array {
return $variables;
}

public function getCustomCss(): string {
public function getCustomCss(string $prefix): string {
$fontPathWoff = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.woff');
$fontPathOtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.otf');
$fontPathTtf = $this->urlGenerator->linkTo('theming', 'fonts/OpenDyslexic-Regular.ttf');
Expand Down
10 changes: 5 additions & 5 deletions apps/theming/lib/Themes/HighContrastTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ public function getCSSVariables(): array {
return $variables;
}

public function getCustomCss(): string {
public function getCustomCss(string $prefix): string {
return "
[class^='icon-'], [class*=' icon-'],
.action,
#appmenu li a,
.menutoggle {
$prefix [class^='icon-'], $prefix [class*=' icon-'],
$prefix .action,
$prefix #appmenu li a,
$prefix .menutoggle {
opacity: 1 !important;
}
";
Expand Down