Skip to content

Commit ccc33dd

Browse files
GustedGusted
authored andcommitted
chore: tweak fomantic config (#8583)
Disable many unneeded variants in fomantic's config. Reduces the amount of CSS is generated. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8583 Reviewed-by: 0ko <[email protected]> Co-authored-by: Gusted <[email protected]> Co-committed-by: Gusted <[email protected]>
1 parent 8e4f50a commit ccc33dd

File tree

3 files changed

+61
-889
lines changed

3 files changed

+61
-889
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ fomantic:
940940
cd $(FOMANTIC_WORK_DIR) && npm install --no-save
941941
cp -f $(FOMANTIC_WORK_DIR)/theme.config.less $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/theme.config
942942
cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/
943+
rm -rf $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/themes/default/modules/dropdown.overrides
943944
$(SED_INPLACE) -e 's/ overrideBrowserslist\r/ overrideBrowserslist: ["defaults"]\r/g' $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/tasks/config/tasks.js
944945
cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
945946
# fomantic uses "touchstart" as click event for some browsers, it's not ideal, so we force fomantic to always use "click" as click event

web_src/fomantic/_site/globals/site.variables

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,33 @@
1414
@variationButtonAnimated: false;
1515
@variationButtonAnimatedFade: false;
1616
@variationButtonAttached: false;
17+
@variationButtonCircular: false;
18+
@variationButtonFloated: false;
1719
@variationButtonInverted: false;
20+
@variationButtonToggle: false;
1821
@variationButtonSocial: false;
1922
@variationButtonTertiary: false;
23+
@variationButtonOr: false;
24+
@variationButtonSizes: mini, tiny, small;
2025
@variationCalendarInverted: false;
2126
@variationCardInverted: false;
2227
@variationCheckboxInverted: false;
2328
@variationCommentInverted: false;
2429
@variationDimmerInverted: false;
2530
@variationDividerInverted: false;
2631
@variationDropdownInverted: false;
32+
@variationDropdownScrollhint: false;
33+
@variationDropdownSimple: false;
2734
@variationFeedInverted: false;
2835
@variationFlyoutInverted: false;
2936
@variationFormInverted: false;
3037
@variationFormTransparent: false;
38+
@variationFormSizes: false;
3139
@variationGridDoubling: false;
3240
@variationGridInverted: false;
3341
@variationHeaderInverted: false;
3442
@variationIconInverted: false;
43+
@variationInputAction: false;
3544
@variationInputInverted: false;
3645
@variationItemInverted: false;
3746
@variationLabelCorner: false;
@@ -40,14 +49,25 @@
4049
@variationLabelRibbon: false;
4150
@variationLabelTag: false;
4251
@variationListInverted: false;
52+
@variationMenuText: false;
53+
@variationMenuFitted: false;
54+
@variationMenuFixed: false;
4355
@variationMenuInverted: false;
4456
@variationMessageInverted: false;
57+
@variationModalBasic: false;
4558
@variationModalInverted: false;
59+
@variationModalLegacy: false;
60+
@variationModalOverlay: false;
61+
@variationModalSizes: mini, tiny, small;
4662
@variationNagInverted: false;
4763
@variationPlaceholderInverted: false;
4864
@variationPopupInverted: false;
4965
@variationPopupTooltip: false;
5066
@variationProgressInverted: false;
67+
@variationSearchAligned: false;
68+
@variationSearchCategory: false;
69+
@variationSearchShort: false;
70+
@variationSearchLong: false;
5171
@variationSegmentInverted: false;
5272
@variationSegmentPiled: false;
5373
@variationSegmentStacked: false;

0 commit comments

Comments
 (0)