Skip to content

Commit

Permalink
Create _font.scss
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Aug 18, 2024
1 parent 6f60994 commit 181c3b3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/scss/classes/_font.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2023 Scape Agency BV

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.


// ============================================================================
// icon.gl | Font Variables
// ============================================================================

@use "../variables" as *;
@use "../mixins" as *;


/**
* Generates CSS classes for each icon by iterating over a map of icon names and codepoints.
*
* @example
* .i_home::before { content: "\e900"; }
* .i_user::before { content: "\e901"; }
*/
@each $icon, $codepoint in $icongl_map {
.i_#{$icon}::before { content: $codepoint; }
}

/**
* Applies a consistent base style to all icons and icon classes.
* This style includes setting the font family from a variable and includes the `icon_style` mixin.
*
* @see icon_style - Refer to the icon_style mixin for detailed style properties applied.
*/
.i::before,
[class^="i_"]::before,
[class*=" i_"]::before {
font-family: $icongl_font !important;
@include icon_style;
}

0 comments on commit 181c3b3

Please sign in to comment.