Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Move to node-sass directly and fix some minor bugs
Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan committed Apr 27, 2022
commit 3f2b7bd77826ee51876450ae68634da9082a2fef
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ clean:

clean-git: clean
git checkout -- dist

scss: dist/core-server.css apps/settings/css/settings.scss
node_modules/node-sass/bin/node-sass apps/settings/css/settings.scss dist/settings-setting-settingss.css

dist/core-%.css: core/css/%.scss
node_modules/node-sass/bin/node-sass $< $@
4 changes: 1 addition & 3 deletions apps/settings/templates/settings/frame.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@

use OCP\Util;

Util::addScript('settings', 'main', );
Util::addScript('settings', 'settings');
Util::addScript('settings', 'admin');
Util::addScript('settings', 'log');
Util::addScript('core', 'setupchecks');
Util::addScript('files', 'jquery.fileupload');
Util::addScript('settings', 'legacy-admin');
Util::addStyle('settings', 'settings');
?>

<div id="app-navigation">
Expand Down
24 changes: 13 additions & 11 deletions core/css/functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
* @return string The color without #
*/
@function remove-hash-from-color($color) {
$color: unquote($color);
@if type-of($color) == 'string' {
$color: unquote($color);
}
$index: str-index(inspect($color), '#');
@if $index {
$color: str-slice(inspect($color), 2);
Expand All @@ -48,9 +50,9 @@
@function icon-color-path($icon, $dir, $color, $version: 1, $core: false) {
$color: remove-hash-from-color($color);
@if $core {
@return '#{$webroot}/svg/core/#{$dir}/#{$icon}?color=#{$color}&v=#{$version}';
@return '../../svg/core/#{$dir}/#{$icon}?color=\##{$color}&v=#{$version}';
} @else {
@return '#{$webroot}/svg/#{$dir}/#{$icon}?color=#{$color}&v=#{$version}';
@return '../../svg/#{$dir}/#{$icon}?color=\##{$color}&v=#{$version}';
}
}

Expand All @@ -66,14 +68,14 @@
* @returns A background image with the url to the set to the requested icon.
*/
@mixin icon-color($icon, $dir, $color, $version: 1, $core: false) {
//$color: remove-hash-from-color($color);
///* $dir is the app name, so we add this to the icon var to avoid conflicts between apps */
//$varName: "--icon-#{$dir}-#{$icon}-#{$color}";
//@if $core {
// $varName: "--icon-#{$icon}-#{$color}";
//}
//#{$varName}: url(icon-color-path($icon, $dir, $color, $version, $core));
//background-image: var(#{$varName});
$color: remove-hash-from-color($color);
/* $dir is the app name, so we add this to the icon var to avoid conflicts between apps */
$varName: "--icon-#{$dir}-#{$icon}-#{$color}";
@if $core {
$varName: "--icon-#{$icon}-#{$color}";
}
#{$varName}: url(icon-color-path($icon, $dir, $color, $version, $core));
background-image: var(#{$varName});
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/css/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

.icon-breadcrumb {
background-image: url('../img/breadcrumb.svg?v=1');
background-image: url('../core/img/breadcrumb.svg?v=1');
}

/* LOADING ------------------------------------------------------------------ */
Expand Down
2 changes: 1 addition & 1 deletion core/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ span.ui-icon {
}
div.crumb {
display: inline-flex;
background-image: url('../img/breadcrumb.svg?v=1');
background-image: url('../core/img/breadcrumb.svg?v=1');
background-repeat: no-repeat;
background-position: right center;
height: 44px;
Expand Down
1 change: 0 additions & 1 deletion core/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import $ from 'jquery'
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import './Polyfill/index'
import '../css/server.scss'

// If you remove the line below, tests won't pass
// eslint-disable-next-line no-unused-vars
Expand Down
3 changes: 0 additions & 3 deletions core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
]);
};

// HACK
$_['cssfiles'][] = ['href' => 'css/server.min.css'];

?><!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
<head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
Expand Down
Loading