From dcfa0809e5bd53d87079b3c100cf190f7d09ff94 Mon Sep 17 00:00:00 2001 From: Ilya Radinsky Date: Fri, 26 Apr 2024 14:55:49 +0300 Subject: [PATCH 1/5] Wrapping all CSS styles into the single root class .react-cm-ui --- src/style.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/style.scss b/src/style.scss index ab6e8b34e..1575f041b 100644 --- a/src/style.scss +++ b/src/style.scss @@ -1,3 +1,4 @@ +.react-cm-ui { // Base @import './styles/normalize'; @import './styles/typography'; @@ -63,3 +64,5 @@ @import './surfaces/infoBar/infoBar'; @import './surfaces/modalDeprecated/modalDeprecated'; @import './surfaces/titleBar/titleBar'; + +} From 6e70e05c6a9d4b6ae4a850f0184ff4c407939c32 Mon Sep 17 00:00:00 2001 From: Ilya Radinsky Date: Tue, 30 Apr 2024 15:07:44 +0300 Subject: [PATCH 2/5] Global .react-cm-ui replaced by .hc-ui --- src/global/constants.js | 2 ++ src/style.scss | 6 +++++- src/styles/normalize.scss | 42 +++++++++++++++++++++------------------ 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/global/constants.js b/src/global/constants.js index 5eaa3bedd..a118b0d09 100644 --- a/src/global/constants.js +++ b/src/global/constants.js @@ -56,3 +56,5 @@ export const EMAIL_LINK_CLASSES = `${UI_CLASS_NAME} ${BEM_EMAIL_LINK}`; export const PERSON_CORE_MILESTONES_CLASSES = `${UI_CLASS_NAME} ${BEM_PERSON_CORE_MILESTONES}`; export const PERSON_CONTACT_INFO_CLASSES = `${UI_CLASS_NAME} ${BEM_PERSON_CONTACT_INFO}`; export const TELEPHONE_LINK_CLASSES = `${UI_CLASS_NAME} ${BEM_TELEPHONE_LINK}`; + +export const UI_LIBRARY_ROOT_CLASS = '.hc-ui'; diff --git a/src/style.scss b/src/style.scss index 1575f041b..415fe2bb5 100644 --- a/src/style.scss +++ b/src/style.scss @@ -1,4 +1,8 @@ -.react-cm-ui { +.hc-ui { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + // Base @import './styles/normalize'; @import './styles/typography'; diff --git a/src/styles/normalize.scss b/src/styles/normalize.scss index 81c6f31ea..64805690e 100644 --- a/src/styles/normalize.scss +++ b/src/styles/normalize.scss @@ -1,24 +1,28 @@ /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} +// +// Need to prevent any impact on html/body elements by react-cm-ui library +// so that the library works correctly in widgets +// +// /** +// * 1. Set default font family to sans-serif. +// * 2. Prevent iOS text size adjust after orientation change, without disabling +// * user zoom. +// */ + +// html { +// font-family: sans-serif; /* 1 */ +// -ms-text-size-adjust: 100%; /* 2 */ +// -webkit-text-size-adjust: 100%; /* 2 */ +// } + +// /** +// * Remove default margin. +// */ + +// body { +// margin: 0; +// } /* HTML5 display definitions ========================================================================== */ From e7c989a06c09032a6d9165b34a01bc5d08893b32 Mon Sep 17 00:00:00 2001 From: Ilya Radinsky Date: Tue, 7 May 2024 17:37:05 +0300 Subject: [PATCH 3/5] / related stuff moved from the typography.scss to the style.scss under .hc-ui class --- src/style.scss | 14 +++++++++++++- src/styles/typography.scss | 13 ------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/style.scss b/src/style.scss index 415fe2bb5..517a67bca 100644 --- a/src/style.scss +++ b/src/style.scss @@ -1,7 +1,19 @@ .hc-ui { - font-family: sans-serif; + @import './colors', './fonts', './fontSizeCalculator'; + + // Source Sans Pro + @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,600italic,400italic,700italic); + + color: color(color); + font-family: $fontFamily; + font-size: em(16px); + font-weight: $fontWeightRegular; + //letter-spacing: .7px; + line-height: 1.375; + -moz-osx-font-smoothing: grayscale; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; // Base @import './styles/normalize'; diff --git a/src/styles/typography.scss b/src/styles/typography.scss index 9312a374d..4d3d182d6 100644 --- a/src/styles/typography.scss +++ b/src/styles/typography.scss @@ -1,19 +1,6 @@ @import './colors', './fonts', './fontSizeCalculator'; -// Source Sans Pro -@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,600italic,400italic,700italic); -html { font-size: 100%; } - body { - color: color(color); - font-family: $fontFamily; - font-size: em(16px); - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - font-weight: $fontWeightRegular; - //letter-spacing: .7px; - line-height: 1.375; - } //Links a { color: color(colorLink); From e5cacc31820b455c0349ec31b8c1f93521f83aa1 Mon Sep 17 00:00:00 2001 From: Geoffrey Roberts Date: Wed, 8 May 2024 14:17:12 -0700 Subject: [PATCH 4/5] fix: other stylesheet imports --- src/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/style.scss b/src/style.scss index 517a67bca..69d8919f8 100644 --- a/src/style.scss +++ b/src/style.scss @@ -1,5 +1,5 @@ .hc-ui { - @import './colors', './fonts', './fontSizeCalculator'; + @import './styles/colors', './styles/fonts', './styles/fontSizeCalculator'; // Source Sans Pro @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,600italic,400italic,700italic); From 1bff88e6437d48fc4e7d03c5c7643454bd25e709 Mon Sep 17 00:00:00 2001 From: Ilya Radinsky Date: Fri, 10 May 2024 16:55:00 +0300 Subject: [PATCH 5/5] Font import moved to the top --- src/style.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/style.scss b/src/style.scss index 69d8919f8..1ff61627e 100644 --- a/src/style.scss +++ b/src/style.scss @@ -1,9 +1,9 @@ +// Source Sans Pro +@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,600italic,400italic,700italic); + .hc-ui { @import './styles/colors', './styles/fonts', './styles/fontSizeCalculator'; - // Source Sans Pro - @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,600italic,400italic,700italic); - color: color(color); font-family: $fontFamily; font-size: em(16px);