Skip to content

Commit

Permalink
fix: remove tilde from use rule
Browse files Browse the repository at this point in the history
  • Loading branch information
laryk9 authored and shlomiassaf committed Jan 12, 2022
1 parent 5c58fe5 commit 66a48ad
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion apps/ngrid-dev-app/src/theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use '../../../libs/ngrid' as ngrid;
@use '../../../libs/ngrid-material' as ngrid-material;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To create a custom theme:
A typical theme file will look something like this:

```scss
@use '~@pebula/ngrid' as ngrid;
@use '@pebula/ngrid' as ngrid;

// 1. Create a palette from a color schema
// `ngrid.$blue-palett` is a predefined color palette provided by `@pebula/ngrid/theming`
Expand Down
4 changes: 2 additions & 2 deletions apps/ngrid-docs-app/content/concepts/theming/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ To create a custom theme:
2. Create a theme from your palette using `ngrid.define-light-theme` or `ngrid.define-dark-theme`
3. Render the theme by including the mixin `ngrid.ngrid-theme`

> We assume the **ngrid** namespace defined (`@use '~@pebula/ngrid' as ngrid`)
> We assume the **ngrid** namespace defined (`@use '@pebula/ngrid' as ngrid`)
A typical theme file will look something like this:

```scss
@use '~@pebula/ngrid' as ngrid;
@use '@pebula/ngrid' as ngrid;

// 1. Create a palette from a color schema
// `ngrid.$blue-palett` is a predefined color palette provided by `@pebula/ngrid/theming`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ There are 2 pre-built CSS themes provided in `@pebula/ngrid-bootstrap/themes`:
If you're using Angular CLI & SCSS, this is as simple as including one line in your `styles.scss` file:

```scss
@use '~bootstrap/dist/css/bootstrap';
@use 'bootstrap/dist/css/bootstrap';
@use '@pebula/ngrid-bootstrap/themes/default-light.css';
```

Expand Down
10 changes: 5 additions & 5 deletions apps/ngrid-docs-app/content/plugins/ngrid-material/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ we create a custom **nGrid** theme (which is no surprise):
2. Create a theme from the palettes using `mat.define-light-theme` or `mat.define-dark-theme`
3. Render the theme by including the mixin `mat.all-component-themes(`

> We assume the **mat** namespace defined (`@use '~@angular/material' as mat`)
> We assume the **mat** namespace defined (`@use '@angular/material' as mat`)
Let's [recall](../../../concepts/theming/introduction#customized-themes-scss) the steps required for creating an **nGrid** theme:

1. Create a palette from a color schema
2. Create a theme from your palette using `ngrid.define-light-theme` or `ngrid.define-dark-theme`
3. Render the theme by including the mixin `ngrid.ngrid-theme`

> We assume the **ngrid** namespace defined (`@use '~@pebula/ngrid' as ngrid`)
> We assume the **ngrid** namespace defined (`@use '@pebula/ngrid' as ngrid`)
When working with material we use the material tools to create a theme object and render the styles. (Step 3)
We can use the same theme to render the **nGrid** theme!
Expand All @@ -64,9 +64,9 @@ missing definitions and create a new theme that you can send to `ngrid.ngrid-the
`ngrid.define-light-theme` and `ngrid.define-dark-theme` accept a palette **or a theme**!!

```scss
@use '~@angular/material' as mat;
@use '~@pebula/ngrid' as ngrid;
@use '~@pebula/ngrid-material' as ngrid-material;
@use '@angular/material' as mat;
@use '@pebula/ngrid' as ngrid;
@use '@pebula/ngrid-material' as ngrid-material;

$typography-config: mat.define-typography-config();
@include mat.core($typography-config);
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-docs-app/src/styles/_default-theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use 'sass:map';
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use '../../../../libs/ngrid' as ngrid;

@function shell-light-theme($primary-palette, $accent-palette) {
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-docs-app/src/styles/_markdown.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use 'sass:map';
@use 'sass:color';
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

@import "~primer-support/index.scss";
@import "~primer-markdown/lib/markdown-body.scss";
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-docs-app/src/styles/_shell-app.theme.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use 'sass:map';
@use 'sass:color';
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

@mixin render-shell-app-theme($theme, $typography-config, $typography-selector: '.mat-typography') {
$primary: map.get($theme, primary);
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-docs-app/src/styles/_toc.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use 'sass:map';
@use 'sass:color';
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

@mixin render($theme) {
$primary: map.get($theme, primary);
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-docs-app/src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use 'default-theme';
@use 'shell-app.theme' as shell;
@use 'markdown' as md;
Expand Down
2 changes: 1 addition & 1 deletion libs/ngrid-material/context-menu/theming/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use 'sass:map';
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

@mixin ngrid-material-context-menu-theme($theme) {
$primary: map.get($theme, primary);
Expand Down
2 changes: 1 addition & 1 deletion libs/ngrid-material/theming/prebuilt/deeppurple-amber.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use '../../../ngrid' as ngrid;
@use '../../index' as ngrid-material;

Expand Down
2 changes: 1 addition & 1 deletion libs/ngrid-material/theming/prebuilt/indigo-pink.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use '../../../ngrid' as ngrid;
@use '../../index' as ngrid-material;

Expand Down
2 changes: 1 addition & 1 deletion libs/ngrid-material/theming/prebuilt/pink-bluegrey.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use '../../../ngrid' as ngrid;
@use '../../index' as ngrid-material;

Expand Down
2 changes: 1 addition & 1 deletion libs/ngrid-material/theming/prebuilt/purple-green.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@use '../../../ngrid' as ngrid;
@use '../../index' as ngrid-material;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/** Create custom theme for the given application configuration. */
export function createCustomTheme(name: string = 'app') {
return `
@use '~@pebula/ngrid' as ngrid;
@use '@pebula/ngrid' as ngrid;
$${name}-palette: ngrid.define-palette(ngrid.$blue-palette);
Expand Down

0 comments on commit 66a48ad

Please sign in to comment.