Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): add dynamic LESS compilation of component variations #781

Merged
merged 71 commits into from
Nov 13, 2019

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented May 28, 2019

Description

This PR is a proposal for a solution to allow users to define which variations of an element will be compiled .
It was often requested to have a possibility to remove certain variations of an element from of the compiled CSS File.

I invented a central file variation.variables which is loaded into the default site.variables to enable all variations by default. If now somebody wants to remove for example the tertiary variant of the button element one just has to add @variationButtonTertiary: false to their custom themes site.variables

Side effect improvements

  • Sizing logic has been unified, so divider, reveal and card also have size options now
  • For the same reason, header and statistic also received missing size options (mini,big,massive)
  • Removed unnecessary !important for statistic size options

@lubber-de lubber-de added type/feat Any feature requests or improvements lang/css Anything involving CSS state/awaiting-reviews Pull requests which are waiting for reviews labels May 28, 2019
@y0hami y0hami added this to the 2.8.0 milestone May 29, 2019
@lubber-de
Copy link
Member Author

Added support for adjustable sizes, so we only have to define all desired sizes in a list

@variationButtonSizes: mini, tiny, small, large, big, huge, massive;

This would also allow someone to add even more/custom desired size definition names at a central place as long as the appropriate font-size variables will be also declared in a custom theme's site.variables:

@thin: 0.1em;
@fat: 2em;
@ultra: 10em;
@unbelievable: 15em;
@variationButtonSizes: mini, small, thin, fat, ultra, unbelievable;

@prudho
Copy link
Contributor

prudho commented May 31, 2019

This is something I thought about too, and I think it's dooable. It will provide a great customization level and will allow a better final framework size.

@y0hami
Copy link
Member

y0hami commented Jul 28, 2019

@lubber-de anything happening with this?

@lubber-de
Copy link
Member Author

lubber-de commented Jul 28, 2019

Nobody, beside @prudho replied so far.. But that also means nobody complained about it 😊
As I also tagged this to 2.8.x I am gonna continue to work on this now as 2.7.7 is released as the new codebase. Shouldn't take too long though

# Conflicts:
#	src/definitions/elements/button.less
…, ribbon, tag, basic, circular, image, attached and size optional
…r, loading, icon, labeled, action, fluid and size optional
…ed, fitted, dividing, block, attached, tags and size optional
…, aligned, floated, fluid, avatar, spaced, centered, groups and size optional
…mage, floated, link, aligned, fitted, animated, horizontal, suffixed, selection, divided, celled, relaxed and size optional
# Conflicts:
#	src/definitions/collections/table.less
#	src/definitions/elements/input.less
#	src/definitions/elements/list.less
@lubber-de
Copy link
Member Author

@hammy2899 Merged develop and resolved the conflicts 🙂

# Conflicts:
#	src/definitions/collections/form.less
#	src/definitions/elements/input.less
#	src/definitions/modules/dropdown.less
#	src/definitions/modules/slider.less
y0hami
y0hami previously approved these changes Nov 12, 2019
Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😅🎉👍

ColinFrick
ColinFrick previously approved these changes Nov 13, 2019
Copy link
Member

@ColinFrick ColinFrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LATM (Looks Awesome To Me) 👍 🥇

prudho
prudho previously approved these changes Nov 13, 2019
Copy link
Contributor

@prudho prudho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me some time, but finally reviewed it... LGTM

exoego
exoego previously approved these changes Nov 13, 2019
Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

# Conflicts:
#	src/definitions/collections/table.less
#	src/definitions/elements/container.less
#	src/definitions/modules/toast.less
#	src/definitions/views/card.less
Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@y0hami y0hami changed the title [Chore] Dynamic LESS compilation of element variations feat(*): add dynamic LESS compilation of component variations Nov 13, 2019
@y0hami y0hami merged commit c048399 into fomantic:develop Nov 13, 2019
@y0hami y0hami removed state/awaiting-reviews Pull requests which are waiting for reviews tag/breaking-change Any pull request which is waiting for a breaking change release labels Nov 13, 2019
@lubber-de lubber-de deleted the feat/variation_control branch November 13, 2019 17:20
@lubber-de
Copy link
Member Author

Docs added by fomantic/Fomantic-UI-Docs#377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants