Skip to content

Commit b34ffe0

Browse files
committed
refactor(themes): comments fixes
1 parent 44bc9da commit b34ffe0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+244
-2042
lines changed

en/components/action-strip.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ To initialize and position the Action Strip correctly, it needs to be inside a r
8787
<igx-icon>format_bold</igx-icon>
8888
</button>
8989
</igx-action-strip>
90-
<div></div>
9190
</div>
9291
```
9392

en/components/banner.md

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -275,71 +275,15 @@ $custom-banner-theme: banner-theme(
275275
);
276276
```
277277

278-
The last step is to pass the custom banner theme:
279-
280-
```scss
281-
@include css-vars($custom-banner-theme);
282-
```
283-
284-
### Using color palettes
285-
286-
Instead of hardcoding the color values, like we just did, we can achieve greater flexibility in terms of colors by using the [`igx-palette`]({environment:sassApiUrl}/index.html#function-igx-palette) and [`igx-color`]({environment:sassApiUrl}/index.html#function-igx-color) functions.
287-
288-
The `igx-palette` function generates a color palette based on the primary, secondary and surface colors that are passed:
289-
290-
```scss
291-
$white-color: #dedede;
292-
$black-color: #151515;
293-
$light-color: #efefef;
294-
295-
$light-banner-palette: palette($primary: $white-color, $secondary: $black-color, $surface: $light-color);
296-
```
297-
298-
And then with [`igx-color`]({environment:sassApiUrl}/index.html#function-igx-color) we can easily retrieve color from the palette.
299-
300-
```scss
301-
$custom-banner-theme: banner-theme(
302-
$banner-message-color: color($light-banner-palette, "secondary", 400),
303-
$banner-background: color($light-banner-palette, "primary", 400),
304-
$banner-illustration-color: color($light-banner-palette, "secondary", 100)
305-
);
306-
```
307-
308278
>[!NOTE]
309-
>The `igx-color` and `igx-palette` are powerful functions for generating and retrieving colors. Please refer to the [`Palettes`](themes/palettes.md) topic for detailed guidance on how to use them.
310-
311-
### Using schemas
279+
>Instead of hardcoding the color values like we just did, we can achieve greater flexibility in terms of colors by using the [`palette`]({environment:sassApiUrl}/index.html#function-palette) and [`color`]({environment:sassApiUrl}/index.html#function-color) functions. Please refer to [`Palettes`](/themes/sass/palettes.md) topic for detailed guidance on how to use them.
312280
313-
You can build a robust and flexible structure that benefits from [`schemas`](themes/sass/schemas.md).
314-
Extend one of the two predefined schemas, that are provided for every component, in this case - [`light-banner`]({environment:sassApiUrl}/index.html#variable-light-banner) schema:
281+
The last step is to pass the custom banner theme:
315282

316283
```scss
317-
// Extending the banner schema
318-
$light-toast-schema: extend(
319-
$light-banner,
320-
(
321-
banner-message-color: (
322-
color: ("secondary", 400)
323-
),
324-
banner-background: (
325-
color: ("primary", 400)
326-
),
327-
banner-illustration-color: (
328-
color: ("secondary", 100)
329-
)
330-
)
331-
);
332-
333-
// Defining banner with the global light schema
334-
$custom-banner-theme: banner-theme(
335-
$palette: $light-banner-palette,
336-
$schema: $light-toast-schema
337-
);
284+
@include css-vars($custom-banner-theme);
338285
```
339286

340-
Don't forget to include the themes in the same way as it was demonstrated above.
341-
342-
343287
<code-view style="height: 530px"
344288
no-themin
345289
data-demos-base-url="{environment:demosBaseUrl}"

en/components/button-group.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import { IGX_BUTTON_GROUP_DIRECTIVES, IgxIconComponent } from 'igniteui-angular'
6666
<button igxButton>
6767
<igx-icon>format_align_right</igx-icon>
6868
</button>
69-
<button igxButton [selected]="true">
69+
<button igxButton selected>
7070
<igx-icon>format_align_justify</igx-icon>
7171
</button>
7272
</igx-buttongroup>
@@ -99,7 +99,7 @@ Use the [`igx-buttongroup`]({environment:angularApiUrl}/classes/igxbuttongroupco
9999
<button igxButton>
100100
<igx-icon>format_align_right</igx-icon>
101101
</button>
102-
<button igxButton [selected]="true">
102+
<button igxButton selected>
103103
<igx-icon>format_align_justify</igx-icon>
104104
</button>
105105
</igx-buttongroup>
@@ -126,7 +126,7 @@ public alignment = ButtonGroupAlignment.vertical;
126126
<igx-buttongroup [alignment]="alignment">
127127
<button igxButton>Sofia</button>
128128
<button igxButton>London</button>
129-
<button igxButton [selected]="true">New York</button>
129+
<button igxButton selected>New York</button>
130130
<button igxButton>Tokyo</button>
131131
</igx-buttongroup>
132132
```

en/components/calendar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ If you traverse the page using *Tab key* you should keep in mind that based on [
360360
- Next month button
361361
- Selected date, Current date, First focusable (not disabled) date in the days view
362362

363-
In an Angular Calendar that contains more than one selected dates, only the first date will be introduced as a tab stop. For example, when an Angular Calendar multi select is enabled and you have selected the dates: *13/10/2020*, *17/10/2020* and *21/10/2020* only *13/10/2020* will be accessible during tab navigation; in an Angular Calendar Range Picker, only the first date of the selected range will be part of the *page tab sequence*.
363+
In an Angular Calendar that contains more than one selected dates, only the first date will be introduced as a tab stop. For example, when an Angular Calendar multi-select is enabled and you have selected the dates: *13/10/2020*, *17/10/2020* and *21/10/2020* only *13/10/2020* will be accessible during tab navigation; in an Angular Calendar Range Picker, only the first date of the selected range will be part of the *page tab sequence*.
364364

365365
>[!NOTE]
366366
> Behavioral change, from *v10.2.0* - Tab key navigation in the *days view* is no longer available. In order to navigate between the dates in the *date view* you should use the *arrow keys*.
@@ -402,7 +402,7 @@ When an `year` inside the decade view is focused, use:
402402
>Following version 8.2.0, keyboard navigation will not focus days that are outside of current month, but will rather change the month in view.
403403
404404
## Multi View Calendar
405-
Multi view calendar supports all three types of selection. Use the [`monthsViewNumber`]({environment:angularApiUrl}/classes/igxcalendarcomponent.html#monthsViewNumber) input to set the number of displayed months, which will be shown horizontally in a flex container. There is no limit on the max value set. While using a multi view calendar, you may want to hide the days that do not belong to the current month. You are able to do it with the [`hideOutsideDays`]({environment:angularApiUrl}/classes/igxcalendarcomponent.html#hideOutsideDays) property. Keyboard navigation moves to next/previous months when those are in view.
405+
Multi-view calendar supports all three types of selection. Use the [`monthsViewNumber`]({environment:angularApiUrl}/classes/igxcalendarcomponent.html#monthsViewNumber) input to set the number of displayed months, which will be shown horizontally in a flex container. There is no limit on the max value set. While using a multi view calendar, you may want to hide the days that do not belong to the current month. You are able to do it with the [`hideOutsideDays`]({environment:angularApiUrl}/classes/igxcalendarcomponent.html#hideOutsideDays) property. Keyboard navigation moves to next/previous months when those are in view.
406406

407407

408408
<code-view style="height: 500px"

en/components/card.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ Following the simplest approach, we create a new theme that extends the [`card-t
341341
```scss
342342
$colorful-card: card-theme(
343343
$background: #011627,
344-
$header-text-color: #FEFEFE,
345-
$subtitle-text-color: #ECAA53,
346-
$content-text-color: #FEFEFE
344+
$header-text-color: #fefefe,
345+
$subtitle-text-color: #ecaa53,
346+
$content-text-color: #fefefe
347347
);
348348
```
349349
As seen, the `card-theme` exposes some useful parameters for basic styling of its items.

en/components/combo-templates.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ Use selector `[igxComboClearIcon]`:
135135
When used with templates, the `igxComboClearIcon` and the `igxComboToggleIcon` selectors, change how the respective buttons appear in the combobox input. Passing content inside of the `igx-combo` also allows templating of the combobox input similar to the way an `igx-input-group` can be templated (using `igx-prefix`, `igx-suffix` and `igxLabel`). The code snippet below illustrates how to add an appropriate label and prefix to the combobox input:
136136

137137
```html
138-
<igx-combo>
139-
<label igxLabel>Locations</label>
140-
<igx-prefix><igx-icon>pin_drop</igx-icon></igx-prefix>
141-
</igx-combo>
138+
<igx-combo>
139+
<label igxLabel>Locations</label>
140+
<igx-prefix><igx-icon>pin_drop</igx-icon></igx-prefix>
141+
</igx-combo>
142142
```
143143

144144
## API Summary

en/components/combo.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ The last step is to include the component's theme.
352352
## Known Issues
353353

354354
- The combobox input that displays the selected items is not editable. However, due to browser specifics in FireFox, the cursor is visible.
355-
- The combobox does not have input for sizing its height. In the future, the [`IgxInputGroup`]({environment:angularApiUrl}/classes/igxinputgroupcomponent.html) component will expose an option that allows custom sizing, and then the [`IgxCombo`]({environment:angularApiUrl}/classes/igxcombocomponent.html) will use the same functionality for proper styling and better consistency.
356355
- When the combobox is bound to an array of primitive data which contains `undefined` (i.e. `[ undefined, ...]`), `undefined` is not displayed in the dropdown. When it is bound to an array of complex data (i.e. objects) and the value used for `valueKey` is `undefined`, the item will be displayed in the dropdown, but cannot be selected.
357356
- When the combobox is bound to a remote service and there is a predefined selection, its input will remain blank until the requested data is loaded.
358357

en/components/date-range-picker.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,11 @@ $purple: #9E379F;
381381
$blue: #61AEDB;
382382
$light-gray: #efefef;
383383

384-
$custom-palette: palette($primary: $blue, $secondary: $purple, $surface: $light-gray);
384+
$custom-palette: palette(
385+
$primary: $blue,
386+
$secondary: $purple,
387+
$surface: $light-gray
388+
);
385389

386390
$today-text: color($custom-palette, "primary", 500);
387391
$text-color: color($custom-palette, "secondary", 200);

en/components/drop-down.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Alternatively, as of `16.0.0` you can import the `IgxDropDownComponent` as a sta
5151
```typescript
5252
// home.component.ts
5353

54-
import { NgFor } from "@angular/common";
55-
import { IGX_DROP_DOWN_DIRECTIVES, IgxToggleActionDirective, IgxButtonDirective } from "igniteui-angular";
54+
import { NgFor } from '@angular/common';
55+
import { IGX_DROP_DOWN_DIRECTIVES, IgxToggleActionDirective, IgxButtonDirective } from 'igniteui-angular';
5656
// import { IGX_DROP_DOWN_DIRECTIVES, IgxToggleActionDirective, IgxButtonDirective } from '@infragistics/igniteui-angular'; for licensed package
5757

5858
@Component({

en/components/grid/groupby.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,16 @@ $custom-theme: grid-theme(
337337
$group-row-background: #494949,
338338
$group-row-selected-background: #383838,
339339
$group-label-column-name-text: #f8f8f8,
340-
$group-label-icon: #FFCD0F,
340+
$group-label-icon: #ffcd0f,
341341
$group-label-text: #f8f8f8,
342-
$group-count-background: #FFCD0F,
342+
$group-count-background: #ffcd0f,
343343
$group-count-text-color: #000,
344-
$expand-icon-color: #FFCD0F,
344+
$expand-icon-color: #ffcd0f,
345345
$expand-icon-hover-color: rgb(223, 181, 13),
346-
$cell-active-border-color: #FFCD0F,
346+
$cell-active-border-color: #ffcd0f,
347347
$row-selected-background: #fff6d3,
348348
$row-selected-text-color: #000,
349-
$drop-indicator-color: #FFCD0F
349+
$drop-indicator-color: #ffcd0f
350350
);
351351

352352
/* Chip theme will style the chips in the Group By area */
@@ -359,17 +359,21 @@ $custom-chips-theme: chip-theme(
359359

360360
### Defining a custom color palette
361361

362-
In the approach that we described above, the color values were hardcoded. Alternatively, you can achieve greater flexibility, using the [`igx-palette`]({environment:sassApiUrl}/index.html#function-igx-palette) and [`igx-color`]({environment:sassApiUrl}/index.html#function-igx-color) functions.
363-
`igx-palette` generates a color palette, based on provided primary, secondary and surface colors.
362+
In the approach that we described above, the color values were hardcoded. Alternatively, you can achieve greater flexibility, using the [`palette`]({environment:sassApiUrl}/index.html#function-palette) and [`color`]({environment:sassApiUrl}/index.html#function-color) functions.
363+
`palette` generates a color palette, based on provided primary, secondary and surface colors.
364364

365365
```scss
366366
$black-color: #292826;
367-
$yellow-color: #FFCD0F;
367+
$yellow-color: #ffcd0f;
368368
$grey-color: #efefef;
369369

370-
$custom-palette: palette($primary: $black-color, $secondary: $yellow-color, $surface: $grey-color);
370+
$custom-palette: palette(
371+
$primary: $black-color,
372+
$secondary: $yellow-color,
373+
$surface: $grey-color
374+
);
371375
```
372-
After a custom palette has been generated, the `igx-color` function can be used to obtain different varieties of the primary and the secondary colors.
376+
After a custom palette has been generated, the `color` function can be used to obtain different varieties of the primary and the secondary colors.
373377

374378
```scss
375379
$custom-theme: grid-theme(
@@ -399,15 +403,15 @@ Extend one of the two predefined schemas, that are provided for every component.
399403
$custom-grid-schema: extend(
400404
$light-grid,
401405
(
402-
group-row-background: (igx-color:('secondary', 100)),
403-
group-row-selected-background: (igx-color:('primary', 400)),
404-
group-label-column-name-text: (igx-color:('primary', 600)),
405-
group-label-icon: (igx-color:('primary', 600)),
406-
group-label-text: (igx-color:('secondary', 700)),
407-
group-count-background: (igx-color:('primary', 600)),
408-
group-count-text-color: (igx-color:('secondary', 400)),
409-
expand-icon-color: (igx-color:('primary', 600)),
410-
expand-icon-hover-color: (igx-color:('primary', 400))
406+
group-row-background: (color:('secondary', 100)),
407+
group-row-selected-background: (color:('primary', 400)),
408+
group-label-column-name-text: (color:('primary', 600)),
409+
group-label-icon: (color:('primary', 600)),
410+
group-label-text: (color:('secondary', 700)),
411+
group-count-background: (color:('primary', 600)),
412+
group-count-text-color: (color:('secondary', 400)),
413+
expand-icon-color: (color:('primary', 600)),
414+
expand-icon-hover-color: (color:('primary', 400))
411415
)
412416
);
413417
```
@@ -417,7 +421,7 @@ In order for the custom schema to be applied, either ([`light`]({environment:sas
417421
$my-custom-schema: extend(
418422
$light-material-schema,
419423
(
420-
igx-grid: $custom-grid-schema
424+
grid: $custom-grid-schema
421425
)
422426
);
423427

0 commit comments

Comments
 (0)