@bitstack/ng-boundary 14.0.1-alpha.1 → 14.0.1-alpha.3
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.
- package/README.md +190 -36
- package/esm2020/lib/bs-boundary.mjs +4 -4
- package/fesm2015/bitstack-ng-boundary.mjs +3 -3
- package/fesm2015/bitstack-ng-boundary.mjs.map +1 -1
- package/fesm2020/bitstack-ng-boundary.mjs +3 -3
- package/fesm2020/bitstack-ng-boundary.mjs.map +1 -1
- package/lib/bs-boundary.d.ts +1 -1
- package/lib/model.d.ts +1 -1
- package/package.json +5 -5
- package/src/lib/_/_awd.scss +109 -0
- package/src/lib/_/_fonts.scss +33 -0
- package/src/lib/_/_mixin.scss +107 -0
- package/src/lib/_/_responsive.scss +698 -0
- package/src/lib/_/_variables.scss +29 -0
- package/src/styles/index.scss +20 -0
- package/styles.scss +8 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
3
|
+
// 基礎尺寸 (無單位數值)
|
|
4
|
+
$design-width: 540;
|
|
5
|
+
$design-height: 960;
|
|
6
|
+
|
|
7
|
+
// 帶單位的版本 (當需要 px 單位時使用)
|
|
8
|
+
$design-width-px: #{$design-width}px;
|
|
9
|
+
$design-height-px: #{$design-height}px;
|
|
10
|
+
|
|
11
|
+
$landscape-ratio: math.div($design-width, $design-height);
|
|
12
|
+
$portrait-ratio: math.div($design-height, $design-width);
|
|
13
|
+
|
|
14
|
+
// Portrait 模式的設計基準
|
|
15
|
+
$layout-portrait-width: $design-width; // 375
|
|
16
|
+
$layout-portrait-height: $design-height; // 667
|
|
17
|
+
|
|
18
|
+
// Landscape 模式的設計基準
|
|
19
|
+
$layout-landscape-width: $design-height; // 667
|
|
20
|
+
$layout-landscape-height: $design-width; // 375
|
|
21
|
+
|
|
22
|
+
$vw-unit: dvw !default;
|
|
23
|
+
$vh-unit: dvh !default;
|
|
24
|
+
|
|
25
|
+
@supports not (width: 100dvh) {
|
|
26
|
+
$vw-unit: vw;
|
|
27
|
+
$vh-unit: vh;
|
|
28
|
+
}
|
|
29
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public SCSS API for @bitstack/ng-boundary
|
|
3
|
+
*
|
|
4
|
+
* This file exports all SCSS utilities, functions, and mixins
|
|
5
|
+
* for use in consumer projects.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* @use '@bitstack/ng-boundary/styles' as boundary;
|
|
9
|
+
*
|
|
10
|
+
* .my-component {
|
|
11
|
+
* width: boundary.px2vw(100);
|
|
12
|
+
* height: boundary.px2vw(200);
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// Export all utilities
|
|
17
|
+
// Note: _awd already includes _responsive internally, so we don't need to forward _responsive separately
|
|
18
|
+
@forward '../lib/_/_variables';
|
|
19
|
+
@forward '../lib/_/_awd';
|
|
20
|
+
@forward '../lib/_/_mixin';
|