@ambita/design-system 6.0.1-271.0 → 6.0.1-291.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,28 +36,7 @@
36
36
  - @ambita/design-system/dist/themes/byggesoknaden.css
37
37
  ============================================================================ */
38
38
 
39
- @use 'sass:math';
40
-
41
- /* ============================================================================
42
- UTILITY FUNCTIONS
43
- ============================================================================ */
44
-
45
- /**
46
- * Convert pixel values to rem units
47
- *
48
- * @param $px - The pixel value to convert
49
- * @param $base - The base font size (default: 16px, browser default)
50
- * @return rem value
51
- *
52
- * Examples:
53
- * rem(16) => 1rem
54
- * rem(24) => 1.5rem
55
- * rem(14) => 0.875rem
56
- * rem(18, 18) => 1rem (custom base)
57
- */
58
- @function rem($px, $base: 16) {
59
- @return math.div($px, $base) * 1rem;
60
- }
39
+ @forward './functions';
61
40
 
62
41
  /* ============================================================================
63
42
  HEADING MIXINS
@@ -0,0 +1,34 @@
1
+ /* ============================================================================
2
+ UTILITY FUNCTIONS
3
+ ============================================================================
4
+
5
+ Reusable SCSS functions.
6
+
7
+ Usage:
8
+ ```scss
9
+ @use '@/css/functions' as *;
10
+
11
+ .custom-element {
12
+ font-size: rem(18); // => 1.125rem (18/16)
13
+ padding: rem(24) rem(16); // => 1.5rem 1rem
14
+ }
15
+ ```
16
+ ============================================================================ */
17
+
18
+ @use 'sass:math';
19
+
20
+ /**
21
+ * Convert pixel values to rem units
22
+ *
23
+ * @param $px - The pixel value to convert
24
+ * @param $base - The base font size (default: 16px, browser default)
25
+ * @return rem value
26
+ *
27
+ * Examples:
28
+ * rem(16) => 1rem
29
+ * rem(24) => 1.5rem
30
+ * rem(14) => 0.875rem
31
+ */
32
+ @function rem($px, $base: 16) {
33
+ @return math.div($px, $base) * 1rem;
34
+ }
@@ -17,6 +17,7 @@
17
17
  ============================================================================ */
18
18
 
19
19
  @use './neo-tokens' as *;
20
+ @forward './functions';
20
21
 
21
22
  /* ============================================================================
22
23
  DROPDOWN/PORTAL CONTENT MIXINS