Skip to content

Commit 2f370bc

Browse files
committed
docs: ui and styling
1 parent 1619ac1 commit 2f370bc

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed
39.1 KB
Loading

ui-and-styling.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ If you need to style parts of the text, you can use a combination of a `Formatte
10491049

10501050
`<DatePicker>` is a UI component that lets users select a date from a pre-configured range.
10511051

1052-
> See also: [TimePicker](/en/docs/elements/components/time-picker).
1052+
> See also: [TimePicker](/ui-and-styling.html#timepicker).
10531053
10541054
---
10551055

@@ -1265,7 +1265,7 @@ export default {
12651265

12661266
`<HtmlView>` is a UI component that lets you show static HTML content.
12671267

1268-
See also: [WebView](/en/docs/elements/components/web-view).
1268+
See also: [WebView](#webview).
12691269

12701270
---
12711271

@@ -1884,7 +1884,7 @@ export class ListViewTipsComponent implements OnInit {
18841884

18851885
#### Using `<ListView>` with multiple `<v-template>` blocks
18861886

1887-
The [`v-template` component](/en/docs/utilities/v-template) is used to define how each list item is shown on the screen.
1887+
The [`v-template` component](https://nativescript-vue.org/en/docs/utilities/v-template/) is used to define how each list item is shown on the screen.
18881888

18891889
If you need to visualize one or more list items differently than the rest, you can enclose them in additional `<v-template>` blocks and use conditions. You can have as many `<v-template>` blocks as needed within one `<ListView>`.
18901890

@@ -3477,7 +3477,7 @@ To apply multiple styles to the text in your `<TextView>`, you can use `<Formatt
34773477

34783478
`<TimePicker>` is a UI component that lets users select time.
34793479

3480-
> See also: [DatePicker](/en/docs/elements/components/date-picker).
3480+
> See also: [DatePicker](ui-and-styling.html#date-picker).
34813481
34823482
---
34833483

@@ -3603,7 +3603,7 @@ export class UsageComponent {
36033603

36043604
`<WebView>` is a UI component that lets you show web content in your app. You can pull and show content from a URL or a local HTML file, or you can render static HTML content.
36053605

3606-
See also: [HtmlView](/en/docs/elements/components/html-view).
3606+
See also: [HtmlView](#htmlview).
36073607

36083608
---
36093609

@@ -4014,7 +4014,8 @@ StackLayout Button + Label {
40144014

40154015
### CSS Overview
40164016

4017-
---
4017+
---
4018+
40184019
#### Applying CSS Styles
40194020

40204021
The CSS styles can be set on 3 different levels:
@@ -4370,7 +4371,7 @@ Platform specifics:
43704371
You can use custom fonts in your app (in .TTF or .OTF format).
43714372
The NativeScript runtime will look for the font files under the `app/fonts/` (or `src/fonts/` if you use Angular) directory and load them automatically.
43724373
4373-
![Custom fonts setup"](../img/font-images/custom-fonts.png 'Custom fonts setup')
4374+
![Custom fonts setup"](/assests/ui-and-styling/custom-fonts.png 'Custom fonts setup')
43744375
43754376
::: tip Tip
43764377
Since NativeScript 7.1, the CLI has the `ns fonts` command. Executing this command will print out the css styles you need for any custom fonts found in your application.
@@ -4445,18 +4446,18 @@ The @import CSS rule allows you to import CSS from a local file. This rule must
44454446
44464447
With NativeScript, it is possible to manage your app styles using the SASS CSS pre-compiler instead of plain CSS files. Just as with web projects, SASS gives your stylesheets extra capabilities like shared variables, mixins and nested style tags.
44474448
4448-
To use SASS with NativeScript, a SASS compiler like [`node-sass`](https://www.npmjs.com/package/node-sass?activeTab=versions) or [`sass`](https://www.npmjs.com/package/dart-sass) is required. This compiler will hook-in to the NativeScript build process and automatically convert `.scss/.sass` files to `.css` during `build` and `livesync` operations. Since SASS is compiled to CSS at build time, it does **not** require any changes to your stylesheet naming conventions for NativeScript's normal convention-based patterns to work. SASS files with the same name as a NativeScript page will still be automatically linked.
4449+
To use SASS with NativeScript, a SASS compiler like [`sass`](https://www.npmjs.com/package/sass) is required. This compiler will hook-in to the NativeScript build process and automatically convert `.scss/.sass` files to `.css` during `build` and `livesync` operations. Since SASS is compiled to CSS at build time, it does **not** require any changes to your stylesheet naming conventions for NativeScript's normal convention-based patterns to work. SASS files with the same name as a NativeScript page will still be automatically linked.
44494450
44504451
You can use SASS with either enabling it manually:
44514452
44524453
```Shell
4453-
npm i node-sass --save-dev
4454+
npm i sass --save-dev
44544455
```
44554456
44564457
Or by using a template that has SASS already enabled. For example:
44574458
44584459
```Shell
4459-
ns create my-sass-app --template --template tns-template-drawer-navigation-ts
4460+
ns create mySassApp --template @nativescript/template-drawer-navigation-ts
44604461
```
44614462
44624463
For projects created with NativeScript 5.x and below (which are using the legacy `nativescript-dev-webpack`), you can run the `migrate` command to update the SASS compiler (and remove the legacy plugin). Note that the `migrate` command is available in NativeScript CLI 6 and above.

0 commit comments

Comments
 (0)