Skip to content

Commit

Permalink
Little adjustments / fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Donov4n committed Jul 30, 2024
1 parent 0f1725a commit 99e5a16
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @pulsanova/icons

> An icon set, ready to be used in SCSS (entirely based on Phosphor icons)
> An icon set, ready to be used in SCSS (entirely based on Phosphor icons)
> _(See `./package.json` for the exact version of Phosphor on which this project is based)_
## Installation
Expand All @@ -12,3 +12,17 @@ npm install @pulsanova/icons
# - Yarn
yarn add @pulsanova/icons
```

## Usage

```scss
@use '@pulsanova/icons' with (
$duotone-primary-color: #eb4034,
);

.my-rule {
@include icons.icon('plus', 'fill') {
font-size: 1.75rem;
}
}
```
34 changes: 21 additions & 13 deletions style/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
font-style: normal;
line-height: 1;
font-variant: normal;
speak: never;
speak: none;
text-transform: none;
text-rendering: auto;
word-wrap: normal;
Expand All @@ -24,7 +24,15 @@
// - Enable Ligatures.
// stylelint-disable-next-line order/properties-order
letter-spacing: 0;
font-feature-settings: 'liga' 1;

/* stylelint-disable property-no-vendor-prefix, declaration-block-no-duplicate-properties */
-webkit-font-feature-settings: 'liga';
-moz-font-feature-settings: 'liga=1';
-moz-font-feature-settings: 'liga';
-ms-font-feature-settings: 'liga' 1;
font-feature-settings: 'liga';
/* stylelint-enable property-no-vendor-prefix, declaration-block-no-duplicate-properties */

font-variant-ligatures: discretionary-ligatures;

// - Improve font rendering.
Expand All @@ -42,7 +50,7 @@
line-height: 1;
font-variant: normal;
text-transform: none;
speak: never;
speak: none;

// - Improve font rendering.
-webkit-font-smoothing: antialiased;
Expand Down Expand Up @@ -111,11 +119,11 @@
@if ($variant == 'duotone') {
position: relative;

// @if ($after) {
// padding-right: 1.25em;
// } @else {
// padding-left: 1.25em;
// }
@if ($after) {
padding-right: 1.25em;
} @else {
padding-left: 1.25em;
}

&::before {
color: $duotone-secondary-color;
Expand Down Expand Up @@ -148,11 +156,11 @@
@if ($variant == 'duotone') {
@extend %icon-font-duotone;

// position: absolute;
// top: 50%;
// width: 1.25em;
// text-align: center;
// transform: translateY(-50%);
position: absolute;
top: 50%;
width: 1.25em;
text-align: center;
transform: translateY(-50%);

@if ($after) {
right: 0;
Expand Down
2 changes: 1 addition & 1 deletion style/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// Path to the font files root directory.
/// @type String
$font-root-path: '~@phosphor-icons/web/src' !default;
$font-root-path: '~@phosphor-icons/web/' !default;

/// Primary color used for duotone icons.
/// @type Color
Expand Down

0 comments on commit 99e5a16

Please sign in to comment.