Skip to content

Commit cf3a87d

Browse files
bundyomanoldonev
authored andcommitted
Make HtmlView white in dark mode, as its internal colors are currently not dependent on mode (#205)
Fix PickerField modal in dark mode Fix SegmentedBar selection colors (it doesn't support changing the color in selected state) Update CHANGELOG Update README Up the version
1 parent 65cb2df commit cf3a87d

File tree

9 files changed

+58
-29
lines changed

9 files changed

+58
-29
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
<a name="2.2.0"></a>
2+
## [2.2.0](https://github.com/NativeScript/theme/compare/v2.1.2...v2.2.0) (2019-10-29)
3+
4+
### Breaking changes
5+
6+
* Separate default core styling again to reduce the core CSS with 20k (breaking)
7+
8+
### Features
9+
10+
* Ship pre-parsed JSON files for all CSS (used with css2json-loader)
11+
* Return $accent input variable, use $focus as internal abstraction
12+
* Rename $ab-background and $ab-color to respectively $complementary and $complementary-color, keep backwards compatibility
13+
* Introduce $...-dark input colors to be able to override the main dark mode colors specifically
14+
15+
### Fixes
16+
17+
* Stop importing view-common in app, use view instead
18+
* Add more padding to action items
19+
* Make the dark complementary color closer to the light one
20+
* Make HtmlView white in dark mode, as its internal colors are currently not dependent on mode
21+
* Fix PickerField modal in dark mode
22+
* Fix SegmentedBar selection colors (it doesn't support changing the color in selected state)
23+
124
<a name="2.1.2"></a>
225
## [2.1.2](https://github.com/NativeScript/theme/compare/v2.1.1...v2.1.2) (2019-10-16)
326

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,22 @@ It does still work with node-sass though.
3535
## Usage
3636

3737
The core theme supports light and dark core styling and skins on top of that. To load the core theme styling, just
38-
load the core CSS (the default skin was added in 2.0.18):
38+
load the core CSS and its default skin:
3939

4040
```css
41-
@import "~@nativescript/theme/css/core.css";
41+
@import "~@nativescript/theme/css/core.css";
42+
@import "~@nativescript/theme/css/default.css";
4243
```
4344

4445
or alternatively SCSS:
4546

4647
```scss
4748
@import "~@nativescript/theme/core";
49+
@import "~@nativescript/theme/default";
4850
```
4951

50-
If you want, you can choose from several different skins. To do that, you can include a second CSS/SCC file just after
51-
you load the core CSS/SCSS (if you use Theme 2.017 or earlier, you will have to include both files for the styling
52-
to work.
52+
If you want, you can choose from several different skins. To do that, you can change the second CSS/SCSS file to the
53+
preferred skin name:
5354

5455
```css
5556
@import "~@nativescript/theme/css/core.css";

app/pages/tabs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/pages/tabs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</TabStrip>
1010

1111
<TabContentItem>
12-
<TextView text="{{ tab1 }}" class="p-20" editable="false"/>
12+
<HtmlView html="{{ tab1 }}" class="p-20" />
1313
</TabContentItem>
1414

1515
<TabContentItem>

package-lock.json

Lines changed: 18 additions & 18 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
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/theme",
3-
"version": "2.1.3",
3+
"version": "2.2.0",
44
"description": "Telerik NativeScript Core Theme",
55
"author": "Telerik <support@telerik.com>",
66
"homepage": "https://www.nativescript.org",

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/theme",
3-
"version": "2.1.2",
3+
"version": "2.2.0",
44
"description": "Telerik NativeScript Core Theme",
55
"author": "Telerik <support@telerik.com>",
66
"main": "index",

src/scss/mixins/components/_controls.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,11 @@
102102
@include colorize(
103103
$color: primary,
104104
$background-color: background,
105-
$selected-background-color: accent
105+
$contrasted-selected-background-color: accent background -20%
106106
);
107107

108108
.ns-ios & {
109109
margin: 0 15;
110-
@include colorize($color: accent);
111110
}
112111
}
113112
}

src/scss/mixins/components/_forms.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@
244244
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAwBAMAAAB3UCypAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTP///////////////////////////////////////////////////////81e3QIAAAAOdFJOUwBAYODAECDQUHDwsKCAaxMi1gAAAZxJREFUSMfll89Kw0AQxmPa1EppMQ9QCHgPIngtPkEpeJecPfkEoWdB8O5dPHr1JYrePLY2NZfyPYMxYbNkk51sshuo+F2yh5lfZv/NzFpWKgDCwID+BNSZo6RoQTgMnkIgfgsoaB8VupLb22FmEnsEdFIF/ZYzZ8xm61HQRWlNsZHOPVms6MN1p7/fgIBaDaD3wEW64M4Z8GIGaidMNk6oHgkVT5gM6mOfHwxnhS8T0GEhuCTspQHobTE2H88GoPMsUOZiI9KH2tgXXVayrWoA7eGy6HKN8wY3aiPZe68ItWX73wAabsXJzWJd6IDFxaE+As01PcFOdLnBoyZ0xDIid+njVRPaw7voMpZsvzp0glPRZYi1eejRwUMzHTB02QaaWa8l0GN2pLjGuNOEjsrtgMrhp6H5NeVSuaY0dFBOdCoJhYbmqY9LnvqUob5YPYgkrQxl5SQXUU6Uoazw5VIqfDVQVqL5T1RKdB20VTNRB23V9tRBO2nQumklGzW9ytC0Pf903Ye69rxCO82HRCdPnk4eZ5bjlhRY/0Q/Hn4/DfXSncYAAAAASUVORK5CYII=');
245245
}
246246

247+
PickerField,
247248
DatePickerField,
248249
TimePickerField,
249250
DateTimePickerFields,
@@ -361,6 +362,11 @@
361362
}
362363
}
363364

365+
HtmlView {
366+
color: light(primary);
367+
background: light(background);
368+
}
369+
364370
PropertyEditor:focus DataFormEditorCore {
365371
@include colorize($contrasted-border-color: accent background 20%);
366372
}

0 commit comments

Comments
 (0)