1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-23 23:02:58 +00:00

Merge pull request #129 from koloml/bugfix/derpibooru-tag-editor-styling

Fixed tag categories headlines having inconsistent spacing between Derpibooru and Furbooru
This commit is contained in:
2025-08-13 16:52:39 +04:00
committed by GitHub
4 changed files with 30 additions and 0 deletions

View File

@@ -47,6 +47,9 @@
],
"js": [
"src/content/tags-editor.ts"
],
"css": [
"src/styles/content/tags-editor.scss"
]
},
{

View File

@@ -134,6 +134,7 @@ export class TagsListBlock extends BaseComponent {
heading.style.display = 'none';
heading.style.order = `var(${TagsListBlock.#orderCssVariableForGroup(group.id)}, 0)`;
heading.style.flexBasis = '100%';
heading.classList.add('tag-category-headline');
// We're inserting heading to the top just to make sure that heading is always in front of the tags related to
// this category.

View File

@@ -1,6 +1,9 @@
$background-color: var(--background-color);
$media-border: var(--media-border);
$media-box-color: var(--media-box-color);
$padding-small: var(--padding-small);
$padding-normal: var(--padding-normal);
$padding-large: var(--padding-large);
// These variables are defined dynamically based on the category of the tag
$resolved-tag-background: var(--tag-background);

View File

@@ -0,0 +1,23 @@
@use '$styles/booru-vars';
@use '$styles/environment';
h2.tag-category-headline {
// Basic margin top and bottom values gathered from Chrome.
$base-margin-top: .83em;
$base-margin-bottom: .62em;
// Tag List element was updated to use flex & gaps. This should be applied to Furbooru later, once updates will be
// applied from the base Philomena version.
@if environment.$current-site == 'derpibooru' {
margin: {
top: calc(#{$base-margin-top} - #{booru-vars.$padding-small});
bottom: calc(#{$base-margin-bottom} - #{booru-vars.$padding-small});
}
}
@else {
margin: {
top: $base-margin-top;
bottom: $base-margin-bottom;
}
}
}