Skip to content

Commit

Permalink
Fixed #61 - Move core alignment styles to theme files
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Feb 5, 2024
1 parent 3cf441e commit 0409e90
Show file tree
Hide file tree
Showing 80 changed files with 4,777 additions and 0 deletions.
122 changes: 122 additions & 0 deletions theme-base/_common.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,125 @@
// core
.p-component, .p-component * {
box-sizing: border-box;
}

.p-hidden-space {
visibility: hidden;
}

.p-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
text-decoration: none;
font-size: 100%;
list-style: none;
}

.p-disabled, .p-disabled * {
cursor: default;
pointer-events: none;
user-select: none;
}

.p-component-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.p-unselectable-text {
user-select: none;
}

.p-sr-only {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal;
}

.p-link {
text-align: left;
background-color: transparent;
margin: 0;
padding: 0;
border: none;
cursor: pointer;
user-select: none;
}

.p-link:disabled {
cursor: default;
}

/* Non vue overlay animations */
.p-connected-overlay {
opacity: 0;
transform: scaleY(0.8);
transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);
}

.p-connected-overlay-visible {
opacity: 1;
transform: scaleY(1);
}

.p-connected-overlay-hidden {
opacity: 0;
transform: scaleY(1);
transition: opacity .1s linear;
}

/* Vue based overlay animations */
.p-connected-overlay-enter-from {
opacity: 0;
transform: scaleY(0.8);
}

.p-connected-overlay-leave-to {
opacity: 0;
}

.p-connected-overlay-enter-active {
transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);
}

.p-connected-overlay-leave-active {
transition: opacity .1s linear;
}

/* Toggleable Content */
.p-toggleable-content-enter-from,
.p-toggleable-content-leave-to {
max-height: 0;
}

.p-toggleable-content-enter-to,
.p-toggleable-content-leave-from {
max-height: 1000px;
}

.p-toggleable-content-leave-active {
overflow: hidden;
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
}

.p-toggleable-content-enter-active {
overflow: hidden;
transition: max-height 1s ease-in-out;
}

// theme
* {
box-sizing: border-box;
}
Expand Down
5 changes: 5 additions & 0 deletions theme-base/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@
@import './components/input/_chips';
@import './components/input/_colorpicker';
@import './components/input/_dropdown';
@import './components/input/_floatlabel';
@import './components/input/_iconfield';
@import './components/input/_inputgroup';
@import './components/input/_inputnumber';
@import './components/input/_inputswitch';
@import './components/input/_inputtext';
@import './components/input/_knob';
@import './components/input/_listbox';
@import './components/input/_multiselect';
@import './components/input/_password';
@import './components/input/_radiobutton';
@import './components/input/_rating';
@import './components/input/_selectbutton';
@import './components/input/_slider';
@import './components/input/_textarea';
@import './components/input/_treeselect';
@import './components/input/_togglebutton';

Expand Down Expand Up @@ -97,6 +101,7 @@
@import './components/misc/_metergroup';
@import './components/misc/_progressbar';
@import './components/misc/_progressspinner';
@import './components/misc/_ripple';
@import './components/misc/_scrolltop';
@import './components/misc/_skeleton';
@import './components/misc/_tag';
Expand Down
70 changes: 70 additions & 0 deletions theme-base/components/button/_button.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
// core
.p-button {
display: inline-flex;
cursor: pointer;
user-select: none;
align-items: center;
vertical-align: bottom;
text-align: center;
overflow: hidden;
position: relative;
}

.p-button-label {
flex: 1 1 auto;
}

.p-button-icon-right {
order: 1;
}

.p-button:disabled {
cursor: default;
}

.p-button-icon-only {
justify-content: center;
}

.p-button-icon-only .p-button-label {
visibility: hidden;
width: 0;
flex: 0 0 auto;
}

.p-button-vertical {
flex-direction: column;
}

.p-button-icon-bottom {
order: 2;
}

.p-buttonset .p-button {
margin: 0;
}

.p-buttonset .p-button:not(:last-child), .p-buttonset .p-button:not(:last-child):hover {
border-right: 0 none;
}

.p-buttonset .p-button:not(:first-of-type):not(:last-of-type) {
border-radius: 0;
}

.p-buttonset .p-button:first-of-type:not(:only-of-type) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.p-buttonset .p-button:last-of-type:not(:only-of-type) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

.p-buttonset .p-button:focus {
position: relative;
z-index: 1;
}

// theme
.p-button {
color: $buttonTextColor;
background: $buttonBg;
Expand Down
79 changes: 79 additions & 0 deletions theme-base/components/button/_speeddial.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
@use 'sass:math';

// core
.p-speeddial {
position: absolute;
display: flex;
}

.p-speeddial-button {
z-index: 1;
}

.p-speeddial-list {
margin: 0;
padding: 0;
list-style: none;
display: flex;
align-items: center;
justify-content: center;
transition: top 0s linear 0.2s;
pointer-events: none;
z-index: 2;
}

.p-speeddial-item {
transform: scale(0);
opacity: 0;
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 0.8s;
will-change: transform;
}

.p-speeddial-action {
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
position: relative;
overflow: hidden;
}

.p-speeddial-circle .p-speeddial-item,
.p-speeddial-semi-circle .p-speeddial-item,
.p-speeddial-quarter-circle .p-speeddial-item {
position: absolute;
}

.p-speeddial-rotate {
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
will-change: transform;
}

.p-speeddial-mask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 250ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.p-speeddial-mask-visible {
pointer-events: none;
opacity: 1;
transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.p-speeddial-opened .p-speeddial-list {
pointer-events: auto;
}

.p-speeddial-opened .p-speeddial-item {
transform: scale(1);
opacity: 1;
}

.p-speeddial-opened .p-speeddial-rotate {
transform: rotate(45deg);
}

// theme
.p-speeddial-button {
&.p-button.p-button-icon-only {
width: $speedDialButtonWidth;
Expand Down
35 changes: 35 additions & 0 deletions theme-base/components/button/_splitbutton.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
// core
.p-splitbutton {
display: inline-flex;
position: relative;
}

.p-splitbutton .p-splitbutton-defaultbutton,
.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button,
.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button,
.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button-outlined.p-button:hover {
flex: 1 1 auto;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0 none;
}

.p-splitbutton-menubutton,
.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button,
.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button {
display: flex;
align-items: center;
justify-content: center;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

.p-splitbutton .p-menu {
min-width: 100%;
}

.p-fluid .p-splitbutton {
display: flex;
}

// theme
.p-splitbutton {
border-radius: $borderRadius;

Expand Down
Loading

0 comments on commit 0409e90

Please sign in to comment.