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

update font weight #148

Merged
merged 5 commits into from
Dec 29, 2021
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
4 changes: 2 additions & 2 deletions src/BIMDataComponents/BIMDataBreadcrumb/BIMDataBreadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
cursor: pointer;
}
&:hover:not(.bimdata-breadcrumb__step--last) {
font-weight: bold;
font-weight: 700;
text-decoration: underline;
}
&::before {
Expand All @@ -128,7 +128,7 @@ export default {
height: 0;
overflow: hidden;
visibility: hidden;
font-weight: bold;
font-weight: 700;
text-decoration: underline;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

&.active {
.bimdata-btn {
font-weight: bold;
font-weight: 700;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

&.active {
.bimdata-btn {
font-weight: bold;
font-weight: 700;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/BIMDataComponents/BIMDataSelect/_BIMDataSelect.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

&.option-group {
color: var(--color-granite);
font-weight: bold;
font-weight: 700;
&:hover {
background-color: transparent;
cursor: default;
Expand Down
4 changes: 2 additions & 2 deletions src/BIMDataComponents/BIMDataTable/_BIMDataTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

th {
font-weight: bold;
font-weight: 700;
color: var(--color-primary);
}

Expand All @@ -39,7 +39,7 @@
align-items: center;
padding: var(--spacing-unit);
font-size: 1rem;
font-weight: bold;
font-weight: 700;
background-color: var(--color-silver-light);
}
}
Expand Down
12 changes: 5 additions & 7 deletions src/BIMDataComponents/BIMDataText/BIMDataText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
},
fontWeight: {
type: String,
default: "primary-font",
default: "400",
},
lineHeight: {
type: String,
Expand Down Expand Up @@ -55,16 +55,14 @@ export default {
},
computed: {
classes() {
return {
[`${this.color}`]: this.color,
[`${this.fontWeight}`]: this.fontWeight,
};
return `${this.color}`;
},
style() {
return {
"font-size": `${this.calcFontSize}`,
"line-height": `${this.calcLineHeight}`,
fontSize: `${this.calcFontSize}`,
lineHeight: `${this.calcLineHeight}`,
display: `${this.display}`,
fontWeight: `${this.fontWeight}`,
margin: `${this.margin}`,
padding: `${this.padding}`,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

&__name {
font-size: 12px;
font-weight: bold;
font-weight: 700;
color: $color-granite;
word-break: break-word;
-webkit-line-clamp: 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default {
max-width: 350px;

&__title {
font-weight: bold;
font-weight: 700;
font-size: 120%;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default {
max-width: 350px;

&__title {
font-weight: bold;
font-weight: 700;
font-size: 120%;
}

Expand Down
10 changes: 5 additions & 5 deletions src/assets/css/_BIMDataFonts.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@font-face {
font-family: "robotobold";
font-family: "roboto";
src: url("../fonts/roboto-bold-webfont.woff2") format("woff2"),
url("../fonts/roboto-bold-webfont.woff2") format("woff");
font-weight: 700;
font-weight: 600 700;
font-style: bold;
font-display: fallback;
}

@font-face {
font-family: "robotomedium";
font-family: "robot";
src: url("../fonts/roboto-medium-webfont.woff2") format("woff2"),
url("../fonts/roboto-medium-webfont.woff") format("woff");
font-weight: 500;
Expand All @@ -17,10 +17,10 @@
}

@font-face {
font-family: "robotoregular";
font-family: "roboto";
src: url("../fonts/roboto-regular-webfont.woff2") format("woff2"),
url("../fonts/roboto-regular-webfont.woff") format("woff");
font-weight: 400;
font-weight: 100 400;
font-style: normal;
font-display: fallback;
}
4 changes: 1 addition & 3 deletions src/assets/css/_BIMDataVariables.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,5 @@ html {
--size-btn-options: 45px;

/* base FONTS -------------------------------------- */
--primary-font: "robotoregular", sans-serif;
--primary-font-medium: "robotomedium", sans-serif;
--primary-font-bold: "robotobold", sans-serif;
--primary-font: "roboto", sans-serif;
}
6 changes: 0 additions & 6 deletions src/assets/css/utilities/_text.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@
.primary-font {
font-family: var(--primary-font);
}
.primary-font-medium {
font-family: var(--primary-font-medium);
}
.primary-font-bold {
font-family: var(--primary-font-bold);
}
2 changes: 2 additions & 0 deletions src/assets/scss/BIMData.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "./BIMDataFonts.scss";

// import GLOBAL STYLE
@import "./BIMDataVariables.scss";
@import "./BIMDataGlobal.scss";
Expand Down
14 changes: 7 additions & 7 deletions src/assets/scss/_BIMDataFonts.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
@font-face {
font-family: "robotobold";
font-family: "roboto";
src: url("~@/assets/fonts/roboto-bold-webfont.woff2") format("woff2"),
url("~@/assets/fonts/roboto-bold-webfont.woff2") format("woff");
font-weight: 700;
font-style: normal;
font-weight: 600 700;
font-style: bold;
font-display: fallback;
}

@font-face {
font-family: "robotomedium";
font-family: "roboto";
src: url("~@/assets/fonts/roboto-medium-webfont.woff2") format("woff2"),
url("~@/assets/fonts/roboto-medium-webfont.woff") format("woff");
font-weight: 500;
font-style: normal;
font-style: medium;
font-display: fallback;
}

@font-face {
font-family: "robotoregular";
font-family: "roboto";
src: url("~@/assets/fonts/roboto-regular-webfont.woff2") format("woff2"),
url("~@/assets/fonts/roboto-regular-webfont.woff") format("woff");
font-weight: 400;
font-weight: 100 400;
font-style: normal;
font-display: fallback;
}
8 changes: 2 additions & 6 deletions src/assets/scss/_BIMDataVariables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ $spacing-unit: 12px;
$size-btn-options: 45px;

/* base FONTS -------------------------------------- */
$primary-font: "robotoregular", sans-serif;
$primary-font-medium: "robotomedium", sans-serif;
$primary-font-bold: "robotobold", sans-serif;
$primary-font: "roboto", sans-serif;

html {
/* base COLORS ------------------------------------------- */
Expand Down Expand Up @@ -102,7 +100,5 @@ html {
--size-btn-options: 45px;

/* base FONTS -------------------------------------- */
--primary-font: "robotoregular", sans-serif;
--primary-font-medium: "robotomedium", sans-serif;
--primary-font-bold: "robotobold", sans-serif;
--primary-font: "roboto", sans-serif;
}
10 changes: 2 additions & 8 deletions src/assets/scss/utilities/_text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
.bimdata-link {
color: var(--color-primary);
border-bottom: 1px solid var(--color-primary);
font-weight: bold;
font-weight: 700;
}

/* BIMDATA FONT WEIGHT */
.primary-font {
font-family: "robotoregular", sans-serif;
}
.primary-font-medium {
font-family: "robotomedium", sans-serif;
}
.primary-font-bold {
font-family: "robotobold", sans-serif;
font-family: "roboto", sans-serif;
}
2 changes: 1 addition & 1 deletion src/web/_DesignSystem-global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ pre[class*="language-"] {
margin: 0 2px;
border-radius: 2px;
color: var(--color-primary);
font-weight: bold;
font-weight: 700;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
align-items: center;
background-color: var(--color-silver-light);
color: var(--color-primary);
font-weight: bold;
font-weight: 700;
}

.demo-parameters {
Expand Down
2 changes: 1 addition & 1 deletion src/web/views/Components/Table/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default {

&__label {
margin-bottom: 12px;
font-weight: bold;
font-weight: 700;
}
}

Expand Down
33 changes: 17 additions & 16 deletions src/web/views/Components/Text/Text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
<BIMDataText
component="span"
color="color-primary"
fontWeight="primary-font-bold"
<BIMDataText component="span" color="color-primary" fontWeight="700"
>reprehenderit</BIMDataText
>
in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Expand Down Expand Up @@ -180,7 +177,7 @@
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
&lt;BIMDataText component="span" color="color-primary" fontWeight="primary-font-bold"&gt;reprehenderit&lt;/BIMDataText&gt;
&lt;BIMDataText component="span" color="color-primary" fontWeight="700"&gt;reprehenderit&lt;/BIMDataText&gt;
in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum."
Expand Down Expand Up @@ -222,18 +219,14 @@ export default {
placeholder: false,
disabled: false,
selectedTextOptionscolor: "color-granite-light",
selectedTextFontWeight: "primary-font",
selectedTextFontWeight: "400",
selectedTextComponent: "p",
displayText: "inline-block",
fontSizeText: "",
lineHeightText: "",
marginText: "",
paddingText: "",
fontWeightText: [
"primary-font",
"primary-font-medium",
"primary-font-bold",
],
fontWeightText: ["400", "500", "700"],
componentsText: ["h1", "h2", "h3", "h4", "h5", "p"],
textOptions: {
color: [
Expand All @@ -252,54 +245,62 @@ export default {
],
},
propsData: [
["Props", "Type", "Default value", "Description"],
["Props", "Type", "Default value", "Description", "Example"],
[
"component",
"String",
"p",
"Use this prop to use a particular title / text block. For example: h1, h2, p, span...",
"Use this prop to use a particular title / text block.",
"h1, h2, p, span...",
],
[
"display",
"String",
"inline-block",
"Use this prop to customize the display of the text block",
"",
],
[
"fontWeight",
"String",
"primary-font",
"Use this prop to customize the font-weight of the text block",
"400",
"Use this prop to customize the font-weight of the text block.",
"400 for regular ; 500 for medium and 700 for bold.",
],
[
"fontSize",
"String",
"14px",
"Use this prop to customize the font-size of the text block. By default, a font-size is assigned for each h1, h2, h3, h4, h5 and p. But if you use this prop you can override it",
"",
],
[
"lineHeight",
"String",
"18px",
"Use this prop to customize the line-height of the text block. By default, a line-height is assigned for each h1, h2, h3, h4, h5 and p. But if you use this prop you can override it",
"",
],
[
"margin",
"String",
"0px",
"Use this prop to customize the margin of the text block.",
"",
],
[
"padding",
"String",
"0px",
"Use this prop to customize the padding of the text block.",
"",
],
[
"color",
"String",
"color-granite-light",
"Use this prop to customize the color of the text block. To know the authorized values, refer to the 'COLOR UTILITY CLASS' line of the Guidelines & Utilities ; Colors page.",
"",
],
],
};
Expand Down Expand Up @@ -331,7 +332,7 @@ export default {
}
},
getFontWeight() {
if (this.selectedTextFontWeight != "primary-font") {
if (this.selectedTextFontWeight != "400") {
return `fontWeight="${this.selectedTextFontWeight}"`;
}
},
Expand Down
Loading