You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: propagate compact size when ui5-content-density-compact class is set (#1136)
- add a global classes `ui5-content-density-compact`, `sapUiSizeCompact`(private) which redefine all **COSY** variables with **COMPACT** values
- adopt all components
- remove compact setting from Configuration
- update documentation for compact / cosy setting
- remove content density related modules
BREAKING CHANGE: set/get for compact size is removed, use CSS class ui5-content-density-compact as a replacement.
Copy file name to clipboardExpand all lines: README.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -127,14 +127,13 @@ UI5 Web Components support right-to-left text direction (RTL). To enable RTL glo
127
127
```
128
128
129
129
### Configure Compact/Cozy setting
130
-
UI5 Web Components supports ```Compact``` and ```Cozy``` mode. It is set to ```Cozy``` by default. To enable ```Compact``` globally, provide the option ```compactSize: true```in the configuration ```script``` tag:
130
+
UI5 Web Components supports ```Compact``` and ```Cozy``` mode. It is set to ```Cozy``` by default. To enable ```Compact```, provide the css class ```ui5-content-density-compact```to any of your HTML elements and it apply compact size to all of its children.
language | en, de, es, etc... | en | Language to be used for translatable texts
12
12
[RTL](#rtl) | true, false | false | When true, sets global text direction to right-to-left
13
-
compactSize | true, false | false | When set, enforces compact density (smaller margins/paddings)
14
13
[animationMode](#animationMode) | full, basic, minimal, none | full | Defines different animation scenarios or levels
15
14
calendarType | Gregorian, Islamic, Buddhist, Japanese, Persian | Gregorian | Default calendar type for date-related web components
16
15
[noConflict](#noConflict) | true, false | Object | false | When set to true, all events will be fired with a "ui5-" prefix only
17
16
[formatSettings](#formatSettings)| See the [Format settings](#formatSettings) section below | Empty object | Allows to override locale-specific configuration
18
17
18
+
### Content Density
19
+
20
+
UI5 Web Components contains different content densities for certain controls that allow your app to adapt to the device in question, allowing you to display larger controls for touch-enabled devices and a smaller, more compact design for devices that are operated by mouse. Cosy size is the default density for all components. Compact Size could be set by adding a class `ui5-content-density-compact` to an html element. It cascades all the way down and enforces compact density (smaller margins/paddings, smaller touch areas, etc).
21
+
19
22
<aname="theme"></a>
20
23
### Theme
21
24
The `theme` setting values above are the technical names of our themes.
@@ -92,7 +95,6 @@ In order to provide configuration settings, include the following ```<script>```
92
95
<scriptdata-ui5-configtype="application/json">
93
96
{
94
97
"rtl":true,
95
-
"compactSize":true,
96
98
"language":"ja",
97
99
"calendarType":"Japanese",
98
100
"formatSettings": {
@@ -118,7 +120,6 @@ To do so, please import the desired functionality from the respective `"@ui5/web
0 commit comments