-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from buildo/Various-fixes
Various fixes
- Loading branch information
Showing
12 changed files
with
318 additions
and
437 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
112 changes: 112 additions & 0 deletions
112
projects/layout-components/src/lib/column/column.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,115 @@ | ||
:host { | ||
display: block; | ||
flex: 0 0 var(--column-width); | ||
} | ||
|
||
:host([width="1/2"]), | ||
:host([width="2/4"]), | ||
:host([width="3/6"]), | ||
:host([width="4/8"]), | ||
:host([width="5/10"]), | ||
:host([width="6/12"]) { | ||
--column-width: calc(1 / 2 * 100%); | ||
} | ||
|
||
:host([width="1/3"]), | ||
:host([width="2/6"]), | ||
:host([width="4/12"]) { | ||
--column-width: calc(1 / 3 * 100%); | ||
} | ||
|
||
:host([width="2/3"]), | ||
:host([width="4/6"]), | ||
:host([width="8/12"]) { | ||
--column-width: calc(2 / 3 * 100%); | ||
} | ||
|
||
:host([width="1/4"]), | ||
:host([width="2/8"]), | ||
:host([width="3/12"]) { | ||
--column-width: calc(1 / 4 * 100%); | ||
} | ||
|
||
:host([width="3/4"]), | ||
:host([width="6/8"]), | ||
:host([width="9/12"]) { | ||
--column-width: calc(3 / 4 * 100%); | ||
} | ||
|
||
:host([width="1/5"]), | ||
:host([width="2/10"]) { | ||
--column-width: calc(1 / 5 * 100%); | ||
} | ||
|
||
:host([width="2/5"]), | ||
:host([width="4/10"]) { | ||
--column-width: calc(2 / 5 * 100%); | ||
} | ||
|
||
:host([width="3/5"]), | ||
:host([width="6/10"]) { | ||
--column-width: calc(3 / 5 * 100%); | ||
} | ||
|
||
:host([width="4/5"]), | ||
:host([width="8/10"]) { | ||
--column-width: calc(4 / 5 * 100%); | ||
} | ||
|
||
:host([width="1/6"]), | ||
:host([width="2/12"]) { | ||
--column-width: calc(1 / 6 * 100%); | ||
} | ||
|
||
:host([width="5/6"]), | ||
:host([width="10/12"]) { | ||
--column-width: calc(5 / 6 * 100%); | ||
} | ||
|
||
:host([width="1/8"]) { | ||
--column-width: calc(1 / 8 * 100%); | ||
} | ||
|
||
:host([width="3/8"]) { | ||
--column-width: calc(3 / 8 * 100%); | ||
} | ||
|
||
:host([width="5/8"]) { | ||
--column-width: calc(5 / 8 * 100%); | ||
} | ||
|
||
:host([width="7/8"]) { | ||
--column-width: calc(7 / 8 * 100%); | ||
} | ||
|
||
:host([width="1/10"]) { | ||
--column-width: calc(1 / 10 * 100%); | ||
} | ||
|
||
:host([width="3/10"]) { | ||
--column-width: calc(3 / 10 * 100%); | ||
} | ||
|
||
:host([width="7/10"]) { | ||
--column-width: calc(7 / 10 * 100%); | ||
} | ||
|
||
:host([width="9/10"]) { | ||
--column-width: calc(9 / 10 * 100%); | ||
} | ||
|
||
:host([width="1/12"]) { | ||
--column-width: calc(1 / 12 * 100%); | ||
} | ||
|
||
:host([width="5/12"]) { | ||
--column-width: calc(5 / 12 * 100%); | ||
} | ||
|
||
:host([width="7/12"]) { | ||
--column-width: calc(7 / 12 * 100%); | ||
} | ||
|
||
:host([width="11/12"]) { | ||
--column-width: calc(11 / 12 * 100%); | ||
} |
8 changes: 6 additions & 2 deletions
8
projects/layout-components/src/lib/column/column.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { Component, HostBinding, Input } from '@angular/core'; | ||
import { ColumnFractionWidth } from '../common'; | ||
|
||
@Component({ | ||
selector: 'column', | ||
standalone: true, | ||
imports: [], | ||
template: `<ng-content></ng-content>`, | ||
styleUrl: './column.component.scss' | ||
styleUrl: './column.component.scss', | ||
}) | ||
export class ColumnComponent { | ||
@HostBinding('style.width') @Input() width: string | undefined; | ||
@HostBinding('style.width') @Input() width: | ||
| string | ||
| ColumnFractionWidth | ||
| undefined; | ||
@HostBinding('style.flex-grow') @Input() flexGrow: string | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 12px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 15 additions & 11 deletions
26
projects/layout-components/src/stories/placeholder/placeholder.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap'); | ||
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap"); | ||
|
||
:host { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: #ECEFF4; | ||
color: #364459; | ||
font-family: "Poppins", sans-serif; | ||
font-weight: 400; | ||
padding: 40px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: #eceff4; | ||
color: #364459; | ||
font-family: "Poppins", sans-serif; | ||
font-weight: 400; | ||
padding: 40px; | ||
} | ||
|
||
p { | ||
margin: 0; | ||
} | ||
margin: 0; | ||
} | ||
|
||
p:not(:empty) + p.default { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.