8000 chore: 3.0.0-alpha.0 release for CoreUI 4 · coreui/coreui-icons-angular@2857fc8 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 13, 2022. It is now read-only.

Commit 2857fc8

Browse files
committed
chore: 3.0.0-alpha.0 release for CoreUI 4
1 parent ed21318 commit 2857fc8

File tree

6 files changed

+48
-85
lines changed

6 files changed

+48
-85
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ proprerty | type | default | description
8585
`size` | `custom`, `custom-size`, `sm`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `5xl`, `6xl`, `7xl`, `8xl`, `9xl` | '' | Size of icon
8686
`title` | string | undefined |
8787
`use` | string | undefined | SVG `<use>`
88-
`customClasses` | string | undefined | Overwrites default `c-icon` component classes
88+
`customClasses` | string | undefined | Overwrites default `.icon` classes
8989
`viewBox` | string | undefined | SVG `viewbox`
9090
`attributes` | any | `{ role: 'img' }` | Object with additional html attributes
9191
`width` | string | undefined | SVG `width`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coreui-icons-angular",
3-
"version": "2.0.0-alpha.1",
3+
"version": "3.0.0-alpha.0",
44
"description": "CoreUI Icons Angular component",
55
"license": "MIT",
66
"homepage": "https://coreui.io",

projects/coreui-icons-angular/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ proprerty | type | default | description
8585
`size` | `custom`, `custom-size`, `sm`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `5xl`, `6xl`, `7xl`, `8xl`, `9xl` | '' | Size of icon
8686
`title` | string | undefined |
8787
`use` | string | undefined | SVG `<use>`
88-
`customClasses` | string | undefined | Overwrites default `c-icon` component classes
88+
`customClasses` | string | undefined | Overwrites default `.icon` classes
8989
`viewBox` | string | undefined | SVG `viewbox`
9090 8000
`attributes` | any | `{ role: 'img' }` | Object with additional html attributes
9191
`width` | string | undefined | SVG `width`

projects/coreui-icons-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/icons-angular",
3-
"version": "2.0.0-alpha.1",
3+
"version": "3.0.0-alpha.0",
44
"description": "CoreUI Icons Angular component and service",
55
"copyright": "Copyright 2021 creativeLabs Łukasz Holeczek",
66
"license": "MIT",
Lines changed: 42 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,49 @@
11
:host use, :host svg { }
22

3-
.c-icon {
3+
// Icon variables
4+
$icon-size-base: 1rem !default;
5+
$icon-size-sm: $icon-size-base * .875 !default;
6+
$icon-size-lg: $icon-size-base * 1.25 !default;
7+
$icon-size-xl: $icon-size-base * 1.5 !default;
8+
$icon-size-xxl: $icon-size-base * 2 !default;
9+
10+
// Icon sizes
11+
@mixin icon-size($icon-size) {
12+
width: $icon-size;
13+
height: $icon-size;
14+
font-size: $icon-size;
15+
}
16+
17+
// Icons
18+
.icon {
419
display: inline-block;
520
color: inherit;
621
text-align: center;
22+
vertical-align: -.125rem; // Fix the position of icon
723
fill: currentColor;
8-
}
9-
10-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size) {
11-
width: 1rem;
12-
height: 1rem;
13-
font-size: 1rem;
14-
}
15-
16-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-2xl {
17-
width: 2rem;
18-
height: 2rem;
19-
font-size: 2rem;
20-
}
21-
22-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-3xl {
23-
width: 3rem;
24-
height: 3rem;
25-
font-size: 3rem;
26-
}
27-
28-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-4xl {
29-
width: 4rem;
30-
height: 4rem;
31-
font-size: 4rem;
32-
}
33-
34-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-5xl {
35-
width: 5rem;
36-
height: 5rem;
37-
font-size: 5rem;
38-
}
39-
40-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-6xl {
41-
width: 6rem;
42-
height: 6rem;
43-
font-size: 6rem;
44-
}
45-
46-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-7xl {
47-
width: 7rem;
48-
height: 7rem;
49-
font-size: 7rem;
50-
}
51-
52-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-8xl {
53-
width: 8rem;
54-
height: 8rem;
55-
font-size: 8rem;
56-
}
57-
58-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-9xl {
59-
width: 9rem;
60-
height: 9rem;
61-
font-size: 9rem;
62-
}
63-
64-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-xl {
65-
width: 1.5rem;
66-
height: 1.5rem;
67-
font-size: 1.5rem;
68-
}
69-
70-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-lg {
71-
width: 1.25rem;
72-
height: 1.25rem;
73-
font-size: 1.25rem;
74-
}
75-
76-
.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-sm {
77-
width: 0.875rem;
78-
height: 0.875rem;
79-
font-size: 0.875rem;
80-
}
81-
82-
.c-icon-c-s,
83-
.c-icon-custom-size {
84-
width: initial !important;
85-
height: initial !important;
24+
&:not(.icon-c-s):not(.icon-custom-size) {
25+
@include icon-size($icon-size-base);
26+
27+
&.icon-xxl {
28+
@include icon-size($icon-size-xxl);
29+
}
30+
31+
&.icon-xl {
32+
@include icon-size($icon-size-xl);
33+
}
34+
35+
&.icon-lg {
36+
@include icon-size($icon-size-lg);
37+
}
38+
39+
&.icon-sm {
40+
@include icon-size($icon-size-sm);
41+
}
42+
43+
@for $i from 3 through 9 {
44+
&.icon-#{$i}xl {
45+
@include icon-size($i * $icon-size-base);
46+
}
47+
}
48+
}
8649
}

projects/coreui-icons-angular/src/lib/icon/icon.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ export class IconComponent {
8282

8383
get computedClasses(): any {
8484
const classes = {
85-
'c-icon': true,
86-
[`c-icon-${this.computedSize}`]: !!this.computedSize
85+
icon: true,
86+
[`icon-${this.computedSize}`]: !!this.computedSize
8787
};
8888
return !!this.customClasses ? this.customClasses : classes;
8989
}

0 commit comments

Comments
 (0)
0