Skip to content

Commit 1643e54

Browse files
Merge pull request #117 from db-ui/main
Auto Update from main
2 parents 7ca279f + 640dab4 commit 1643e54

File tree

8 files changed

+31
-14
lines changed

8 files changed

+31
-14
lines changed

docs/getStarted.adoc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ This should add a new entry to your `package.json` file:
5858
@import "@db-ui/core/sources/css/enterprise/db-ui-core";
5959
----
6060

61-
### SCSS: `node_modules include path / load path
61+
### SCSS: node_modules include path / load path
6262

6363
Please keep in mind, that you would need to set your `include path` also known as `load path` depending on your setup for the sass compiler to find the correct `node_modules` folder, e.g. like the following (this is similar to how other frameworks and libraries like link:https://github.com/twbs/bootstrap-npm-starter/blob/main/package.json#L18[Bootstrap] are handling this):
6464

@@ -172,6 +172,24 @@ If you want to use the compiled CSS directly, you can refence the css files in y
172172
<link rel="stylesheet" href="css/enterprise/db-ui-core.css" type="text/css">
173173
----
174174

175+
## Example 2: how to use DB UI Core in Create React app
176+
177+
Create React App offers only limited access to the configuration of the production build. While it uses webpack under the hood, the webpack configuration is not exposed to the user.
178+
To manage your CRA to work with SASS include Path you have to update or create your _.env_ file:
179+
180+
----
181+
SASS_PATH=node_modules
182+
----
183+
184+
In addition to get the asset paths working you have to load them separately. Further description is written above within the section _webpack based bundlers_.
185+
186+
[source,scss]
187+
----
188+
@import "@db-ui/core/sources/css/webpack.assets-paths";
189+
@import "@db-ui/core/sources/css/enterprise/db-ui-core";
190+
----
191+
192+
175193
## Documentation
176194

177195
Please find our Architectural Decision Records within the link:adr/[adr subfolder].

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"dialog-polyfill": "^0.5.6",
8181
"dotenv": "^16.0.3",
8282
"find-versions-cli": "^4.0.0",
83-
"html-validate": "^7.7.0",
83+
"html-validate": "^7.7.1",
8484
"html5-boilerplate": "^8.0.0",
8585
"husky": "^8.0.1",
8686
"iframe-resizer": "^4.3.2",

source/_patterns/00-base/icons/_icons.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @import "icons.variables";
22

33
@import "icons.variables";
4+
@import "icons.attributes-mappings";
45
@import "icons.helpers";
56
@import "icons.custom-properties";
67
@import "icons.font-faces";
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import "icons.variables";
22

3-
@import "../icons.attributes-mappings";
43
@import "icons.custom-properties";
54
@import "icons.font-faces";
65
@import "../icons";

source/_patterns/02-components/mainnavigation/_mainnavigation.variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@import "../../00-base/icons/icons.helpers";
44

55
$header-big-link-paddingTop: 32 * 0.0625 !default;
6+
$header---backgroundColor: #fdfdfd !default; // TODO: This would need to get replaced by the correct (semantic) color
67

78
// * reduced height
89
// $header-big-link-paddingTop: 19*0.0625 !default;

source/_patterns/02-components/mainnavigation/mainnavigation.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@include icon(glyph(menu), 24, "outline", $partial: $partial);
3737
@include icon(glyph(close), 24, "outline", "after", $partial: $partial);
3838

39-
background-color: #fdfdfd; // TODO: This would need to get replaced by the correct (semantic) color
39+
background-color: $header---backgroundColor; // TODO: This would need to get replaced by the correct (semantic) color
4040

4141
border-bottom: 1px solid $db-colors-secondary-enabled;
4242

@@ -79,7 +79,7 @@
7979
}
8080

8181
ul {
82-
background-color: #fff;
82+
background-color: $header---backgroundColor;
8383
}
8484

8585
// Multiple level navigation

source/_patterns/03-areas/00-header/_header.variables.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ $header---borderBottom: #{to-rem(
1313
$header---marginBottom: to-rem(
1414
$pxValue: 16
1515
) !default;
16-
17-
$header---backgroundColor: #fdfdfd !default; // TODO: This would need to get replaced by the correct (semantic) color

0 commit comments

Comments
 (0)