mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
SCSS: Refactor .is-code by moving it to helper file and renaming it
This commit is contained in:
@@ -16,9 +16,6 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
$ibo-code--background-color: $ibo-color-white-200 !default;
|
||||
$ibo-code--padding: 1.25rem 1.5rem !default;
|
||||
|
||||
/* Note: We have to wrap it in the ID in order to overload its rules, otherwise, the ID takes over the simple CSS class... */
|
||||
#ibo-center-container {
|
||||
&.ibo-center-container--with-side-content {
|
||||
@@ -45,9 +42,3 @@ $ibo-code--padding: 1.25rem 1.5rem !default;
|
||||
background-color: $ibo-content-block--background-color;
|
||||
border-left: $ibo-content-block--border;
|
||||
}
|
||||
|
||||
.ibo-code {
|
||||
background-color: $ibo-code--background-color;
|
||||
padding: $ibo-code--padding;
|
||||
@extend %ibo-font-code-150;
|
||||
}
|
||||
@@ -16,6 +16,10 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/* SCSS variables */
|
||||
$ibo-is-code--background-color: $ibo-color-white-200 !default;
|
||||
$ibo-is-code--padding: 1.25rem 1.5rem !default;
|
||||
|
||||
/**************/
|
||||
/* Visibility */
|
||||
/**************/
|
||||
@@ -116,6 +120,12 @@ body.ibo-has-fullscreen-descendant {
|
||||
}
|
||||
}
|
||||
|
||||
.ibo-is-code {
|
||||
background-color: $ibo-is-code--background-color;
|
||||
padding: $ibo-is-code--padding;
|
||||
@extend %ibo-font-code-150;
|
||||
}
|
||||
|
||||
%ibo-medallion {
|
||||
position: relative;
|
||||
border-radius: var(--ibo-border-radius-full);
|
||||
|
||||
@@ -31,7 +31,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForCode(string $sCode, string $sId = null)
|
||||
{
|
||||
$oCode = new UIContentBlock($sId, ['ibo-code']);
|
||||
$oCode = new UIContentBlock($sId, ['ibo-is-code']);
|
||||
$sCode = str_replace("\n", '<br>', $sCode);
|
||||
$oCode->AddSubBlock(new Html($sCode));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user