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

[Dependency] Fix compatibility issue with less >= 3.5 due to math changes #97

Merged
merged 1 commit into from
Aug 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/definitions/collections/grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
margin: (@rowSpacing / 2) (@gutterWidth / 2);
}
.ui.grid .column + .ui.vertical.divider {
height: ~"calc(50% - "(@rowSpacing/2)~")";
height: e(%("calc(50%% - %d)", @rowSpacing / 2));
}

/* Remove Border on Last Horizontal Segment */
Expand Down Expand Up @@ -1077,7 +1077,7 @@
top: 0em;
left: 0px;

width: ~"calc(100% - "@gutterWidth~")";
width: e(%("calc(100%% - %d)", @gutterWidth));
height: 1px;

margin: 0% (@gutterWidth / 2);
Expand Down Expand Up @@ -1112,12 +1112,12 @@
.ui.relaxed[class*="vertically divided"].grid > .row:before {
margin-left: (@relaxedGutterWidth / 2);
margin-right: (@relaxedGutterWidth / 2);
width: ~"calc(100% - "@relaxedGutterWidth~")";
width: e(%("calc(100%% - %d)", @relaxedGutterWidth));
Copy link
Contributor

@prudho prudho Aug 20, 2018

Choose a reason for hiding this comment

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

100%% ? This might not be correct.

EDIT: (happen 18 times in the code)

Copy link
Member Author

Choose a reason for hiding this comment

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

It is:

If you need to print the percentage symbol, escape it by another percentage %%.

% format
http://lesscss.org/functions/#string-functions

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah I see, sorry !

}
.ui[class*="very relaxed"][class*="vertically divided"].grid > .row:before {
margin-left: @veryRelaxedGutterWidth;
margin-right: @veryRelaxedGutterWidth;
width: ~"calc(100% - "@veryRelaxedGutterWidth~")";
width: e(%("calc(100%% - %d)", @veryRelaxedGutterWidth));
}

/*----------------------
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/collections/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@

/* Menu */
.ui.menu .dropdown.item .menu {
min-width: ~"calc(100% - 1px)";
min-width: e("calc(100% - 1px)");
border-radius: 0em 0em @dropdownMenuBorderRadius @dropdownMenuBorderRadius;
background: @dropdownBackground;
margin: @dropdownMenuDistance 0px 0px;
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ select.ui.dropdown {
@media all and (-ms-high-contrast:none) {
.ui.scrolling.dropdown .menu,
.ui.dropdown .scrolling.menu {
min-width: ~"calc(100% - "@scrollbarWidth~")";
min-width: e(%("calc(100%% - %d)", @scrollbarWidth));
}
}
@media only screen and (max-width : @largestMobileScreen) {
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/collections/grid.variables
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@gutterWidth: 2rem;
@rowSpacing: 2rem;

@tableWidth: ~"calc(100% + "@gutterWidth~")";
@tableWidth: e(%("calc(100%% + %d)", @gutterWidth));
@columnMaxImageWidth: 100%;

@consecutiveGridDistance: (@rowSpacing / 2);
Expand Down
4 changes: 2 additions & 2 deletions src/themes/default/collections/menu.variables
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
@tabularVerticalBackground: none @tabularBackgroundColor;

@tabularFluidOffset: 1px;
@tabularFluidWidth: ~"calc(100% + "(@tabularFluidOffset * 2)~")";
@tabularFluidWidth: e(%("calc(100%% + %d)", @tabularFluidOffset * 2));

@tabularActiveBackground: none @white;
@tabularActiveColor: @selectedTextColor;
Expand Down Expand Up @@ -430,7 +430,7 @@
@attachedTopOffset: 0px;
@attachedBottomOffset: 0px;
@attachedHorizontalOffset: -@borderWidth;
@attachedWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")";
@attachedWidth: e(%("calc(100%% + %d)", -@attachedHorizontalOffset * 2));
@attachedBoxShadow: none;
@attachedBorder: @borderWidth solid @solidBorderColor;
@attachedBottomBoxShadow:
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/collections/table.variables
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
@attachedTopOffset: 0px;
@attachedBottomOffset: 0px;
@attachedHorizontalOffset: -@borderWidth;
@attachedWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")";
@attachedWidth: e(%("calc(100%% + %d)", -@attachedHorizontalOffset * 2));
@attachedBoxShadow: none;
@attachedBorder: @borderWidth solid @solidBorderColor;
@attachedBottomBoxShadow:
Expand Down
18 changes: 9 additions & 9 deletions src/themes/default/elements/container.variables
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
@veryRelaxedGridGutterWidth: 5rem;

@mobileGridWidth: @mobileWidth;
@tabletGridWidth: ~"calc("@tabletWidth~" + "@gridGutterWidth~")";
@computerGridWidth: ~"calc("@computerWidth~" + "@gridGutterWidth~")";
@largeMonitorGridWidth: ~"calc("@largeMonitorWidth~" + "@gridGutterWidth~")";
@tabletGridWidth: e(%("calc(%d + %d)", @tabletWidth, @gridGutterWidth));
@computerGridWidth: e(%("calc(%d + %d)", @computerWidth, @gridGutterWidth));
@largeMonitorGridWidth: e(%("calc(%d + %d)", @largeMonitorWidth, @gridGutterWidth));

@mobileRelaxedGridWidth: @mobileWidth;
@tabletRelaxedGridWidth: ~"calc("@tabletWidth~" + "@relaxedGridGutterWidth~")";
@computerRelaxedGridWidth: ~"calc("@computerWidth~" + "@relaxedGridGutterWidth~")";
@largeMonitorRelaxedGridWidth: ~"calc("@largeMonitorWidth~" + "@relaxedGridGutterWidth~")";
@tabletRelaxedGridWidth: e(%("calc(%d + %d)", @tabletWidth, @relaxedGridGutterWidth));
@computerRelaxedGridWidth: e(%("calc(%d + %d)", @computerWidth, @relaxedGridGutterWidth));
@largeMonitorRelaxedGridWidth: e(%("calc(%d + %d)", @largeMonitorWidth, @relaxedGridGutterWidth));

@mobileVeryRelaxedGridWidth: @mobileWidth;
@tabletVeryRelaxedGridWidth: ~"calc("@tabletWidth~" + "@veryRelaxedGridGutterWidth~")";
@computerVeryRelaxedGridWidth: ~"calc("@computerWidth~" + "@veryRelaxedGridGutterWidth~")";
@largeMonitorVeryRelaxedGridWidth: ~"calc("@largeMonitorWidth~" + "@veryRelaxedGridGutterWidth~")";
@tabletVeryRelaxedGridWidth: e(%("calc(%d + %d)", @tabletWidth, @veryRelaxedGridGutterWidth));
@computerVeryRelaxedGridWidth: e(%("calc(%d + %d)", @computerWidth, @veryRelaxedGridGutterWidth));
@largeMonitorVeryRelaxedGridWidth: e(%("calc(%d + %d)", @largeMonitorWidth, @veryRelaxedGridGutterWidth));

/*-------------------
Types
Expand Down
4 changes: 2 additions & 2 deletions src/themes/default/elements/divider.variables
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
/* Horizontal / Vertical */
@horizontalMargin: '';
@horizontalDividerMargin: 1em;
@horizontalRulerOffset: ~"calc(-50% - "(@horizontalDividerMargin)~")";
@horizontalRulerOffset: e(%("calc(-50%% - %d)", @horizontalDividerMargin));

@verticalDividerMargin: 1rem;
@verticalDividerHeight: ~"calc(100% - "(@verticalDividerMargin)~")";
@verticalDividerHeight: e(%("calc(100%% - %d)", @verticalDividerMargin));

/* Inverted */
@invertedTextColor: @white;
Expand Down
14 changes: 7 additions & 7 deletions src/themes/default/elements/label.variables
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@
@ribbonShadowColor: rgba(0, 0, 0, 0.15);

@ribbonMargin: 1rem;
@ribbonOffset: ~"calc("-@ribbonMargin~" - "@ribbonTriangleSize~")";
@ribbonDistance: ~"calc("@ribbonMargin~" + "@ribbonTriangleSize~")";
@rightRibbonOffset: ~"calc(100% + "@ribbonMargin~" + "@ribbonTriangleSize~")";
@ribbonOffset: e(%("calc(%d - %d)", -@ribbonMargin, @ribbonTriangleSize));
@ribbonDistance: e(%("calc(%d + %d)", @ribbonMargin, @ribbonTriangleSize));
@rightRibbonOffset: e(%("calc(100%% + %d + %d)", @ribbonMargin, @ribbonTriangleSize));

@ribbonImageTopDistance: 1rem;
@ribbonImageMargin: -0.05rem; /* Rounding Offset on Triangle */
@ribbonImageOffset: ~"calc("-@ribbonImageMargin~" - "@ribbonTriangleSize~")";
@rightRibbonImageOffset: ~"calc(100% + "@ribbonImageMargin~" + "@ribbonTriangleSize~")";
@ribbonImageOffset: e(%("calc(%d - %d)", -@ribbonImageMargin, @ribbonTriangleSize));
@rightRibbonImageOffset: e(%("calc(100%% + %d + %d)", @ribbonImageMargin, @ribbonTriangleSize));

@ribbonTableMargin: @relativeMini; /* Rounding Offset on Triangle */
@ribbonTableOffset: ~"calc("-@ribbonTableMargin~" - "@ribbonTriangleSize~")";
@rightRibbonTableOffset: ~"calc(100% + "@ribbonTableMargin~" + "@ribbonTriangleSize~")";
@ribbonTableOffset: e(%("calc(%d - %d)", -@ribbonTableMargin, @ribbonTriangleSize));
@rightRibbonTableOffset: e(%("calc(100%% + %d + %d)", @ribbonTableMargin, @ribbonTriangleSize));


/* Colors */
Expand Down
4 changes: 2 additions & 2 deletions src/themes/default/elements/rail.variables
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
@splitCloseDistance: (@closeDistance / 2);
@splitVeryCloseDistance: (@veryCloseDistance / 2);

@closeWidth: ~"calc("@width~" + "@splitCloseDistance~")";
@veryCloseWidth: ~"calc("@width~" + "@splitVeryCloseDistance~")";
@closeWidth: e(%("calc(%d + %d)", @width, @splitCloseDistance));
@veryCloseWidth: e(%("calc(%d + %d)", @width, @splitVeryCloseDistance));

/* Dividing */
@dividingBorder: 1px solid @borderColor;
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/elements/segment.variables
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
@attachedTopOffset: 0px;
@attachedBottomOffset: 0px;
@attachedHorizontalOffset: -@borderWidth;
@attachedWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")";
@attachedWidth: e(%("calc(100%% + %d)", -@attachedHorizontalOffset * 2));
@attachedBoxShadow: none;
@attachedBorder: @borderWidth solid @solidBorderColor;
@attachedBottomBoxShadow:
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/elements/step.variables
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

@attachedHorizontalOffset: -@borderWidth;
@attachedVerticalOffset: 0;
@attachedWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")";
@attachedWidth: e(%("calc(100%% + %d)", -@attachedHorizontalOffset * 2));

@orderedFontFamily: inherit;
@orderedFontWeight: @bold;
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/globals/site.variables
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
@headerLineHeightOffset : (@headerLineHeight - 1em) / 2;

/* Header Spacing */
@headerTopMargin : ~"calc(2rem - "@headerLineHeightOffset~")";
@headerTopMargin : e(%("calc(2rem - %d)", @headerLineHeightOffset));
@headerBottomMargin : 1rem;
@headerMargin : @headerTopMargin 0em @headerBottomMargin;

Expand Down
4 changes: 2 additions & 2 deletions src/themes/default/modules/dimmer.variables
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
@textColor: @white;
@overflow: hidden;

@blurredStartFilter: ~"blur(0px) grayscale(0)";
@blurredEndFilter: ~"blur(5px) grayscale(0.7)";
@blurredStartFilter: e("blur(0px) grayscale(0)");
@blurredEndFilter: e("blur(5px) grayscale(0.7)");
@blurredTransition: 800ms filter @defaultEasing;

@blurredBackgroundColor: rgba(0, 0, 0, 0.6);
Expand Down
4 changes: 2 additions & 2 deletions src/themes/default/modules/dropdown.variables
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@menuBoxShadow: @raisedShadow;
@menuBorderRadius: @borderRadius;
@menuTransition: opacity @defaultDuration @defaultEasing;
@menuMinWidth: ~"calc(100% + "(@menuBorderWidth * 2)~")";
@menuMinWidth: e(%("calc(100%% + %d)", @menuBorderWidth * 2));
@menuZIndex: 11;

/* Text */
Expand Down Expand Up @@ -316,7 +316,7 @@
/* Scrolling */
@scrollingMenuWidth: 100%;
@scrollingMenuItemBorder: none;
@scrollingMenuRightItemPadding: ~"calc("(@itemHorizontalPadding)~" + "(@scrollbarWidth)~")";
@scrollingMenuRightItemPadding: e(%("calc(%d + %d)", @itemHorizontalPadding, @scrollbarWidth));

@scrollingMobileMaxItems: 4;
@scrollingTabletMaxItems: 6;
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/modules/popup.variables
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

/* Grid Inside Popup */
@nestedGridMargin: -0.7rem -0.875rem; /* (padding * @medium) */
@nestedGridWidth: ~"calc(100% + 1.75rem)";
@nestedGridWidth: e("calc(100% + 1.75rem)");

/*-------------------
States
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/modules/search.variables
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@promptBoxShadow: 0em 0em 0em 0em transparent inset;

/* Mobile */
@mobileMaxWidth: ~"calc(100vw - 2rem)";
@mobileMaxWidth: e("calc(100vw - 2rem)");

/* Result Box */
@resultsWidth: 18em;
Expand Down
22 changes: 11 additions & 11 deletions src/themes/default/views/card.variables
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

/* Buttons */
@buttonMargin: 0px -@borderWidth;
@buttonWidth: ~"calc(100% + "(@borderWidth * 2)~")";
@buttonWidth: e(%("calc(100%% + %d)", @borderWidth * 2));

/*-------------------
Variations
Expand Down Expand Up @@ -189,29 +189,29 @@

@oneCard: @oneColumn;
@oneCardOffset: 0em;
@twoCard: ~"calc("@twoColumn~" - "(@twoCardSpacing * 2)~")";
@twoCard: e(%("calc(%d - %d)", @twoColumn, @twoCardSpacing * 2));
@twoCardOffset: -@twoCardSpacing;
@threeCard: ~"calc("@threeColumn~" - "(@threeCardSpacing * 2)~")";
@threeCard: e(%("calc(%d - %d)", @threeColumn, @threeCardSpacing * 2));
@threeCardOffset: -@threeCardSpacing;
@fourCard: ~"calc("@fourColumn~" - "(@fourCardSpacing * 2)~")";
@fourCard: e(%("calc(%d - %d)", @fourColumn, @fourCardSpacing * 2));
@fourCardOffset: -@fourCardSpacing;
@fiveCard: ~"calc("@fiveColumn~" - "(@fiveCardSpacing * 2)~")";
@fiveCard: e(%("calc(%d - %d)", @fiveColumn, @fiveCardSpacing * 2));
@fiveCardOffset: -@fiveCardSpacing;
@sixCard: ~"calc("@sixColumn~" - "(@sixCardSpacing * 2)~")";
@sixCard: e(%("calc(%d - %d)", @sixColumn, @sixCardSpacing * 2));
@sixCardOffset: -@sixCardSpacing;
@sevenCard: ~"calc("@sevenColumn~" - "(@sevenCardSpacing * 2)~")";
@sevenCard: e(%("calc(%d - %d)", @sevenColumn, @sevenCardSpacing * 2));
@sevenCardOffset: -@sevenCardSpacing;
@eightCard: ~"calc("@eightColumn~" - "(@sevenCardSpacing * 2)~")";
@eightCard: e(%("calc(%d - %d)", @eightColumn, @sevenCardSpacing * 2));
@eightCardOffset: -@sevenCardSpacing;
@nineCard: ~"calc("@nineColumn~" - "(@nineCardSpacing * 2)~")";
@nineCard: e(%("calc(%d - %d)", @nineColumn, @nineCardSpacing * 2));
@nineCardOffset: -@nineCardSpacing;
@tenCard: ~"calc("@tenColumn~" - "(@tenCardSpacing * 2)~")";
@tenCard: e(%("calc(%d - %d)", @tenColumn, @tenCardSpacing * 2));
@tenCardOffset: -@tenCardSpacing;

/* Stackable */
@stackableRowSpacing: 1em;
@stackableCardSpacing: 1em;
@stackableMargin: ~"calc("@oneColumn~" - "(@stackableCardSpacing * 2)~")";
@stackableMargin: e(%("calc(%d - %d)", @oneColumn, @stackableCardSpacing * 2));

/* Sizes */
@medium: 1em;
Expand Down