mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Smooth gradient for headers
This commit is contained in:
parent
0a45b75df5
commit
799ecb86e6
6 changed files with 124 additions and 57 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import '../../utils/mixin.less';
|
||||||
|
|
||||||
.theme-light .daggerheart.dialog.dh-style.views.tag-team-dialog {
|
.theme-light .daggerheart.dialog.dh-style.views.tag-team-dialog {
|
||||||
.initialization-container .members-container .member-container {
|
.initialization-container .members-container .member-container {
|
||||||
.member-name {
|
.member-name {
|
||||||
|
|
@ -62,17 +64,7 @@
|
||||||
|
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
text-shadow: 1px 1px 2px var(--shadow-color), 0 0 10px var(--shadow-color);
|
text-shadow: 1px 1px 2px var(--shadow-color), 0 0 10px var(--shadow-color);
|
||||||
|
.smooth-gradient-ease-in-out(background-image, to bottom, var(--shadow-color), 100%);
|
||||||
// Basic "scrim" gradient
|
|
||||||
background-image: linear-gradient(
|
|
||||||
to top,
|
|
||||||
var(--shadow-color),
|
|
||||||
rgba(from var(--shadow-color) r g b / 0.834) 10.6%,
|
|
||||||
rgba(from var(--shadow-color) r g b / 0.541) 34%,
|
|
||||||
rgba(from var(--shadow-color) r g b / 0.382) 47%,
|
|
||||||
rgba(from var(--shadow-color) r g b / 0.194) 65%,
|
|
||||||
transparent 100%
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
mask-image: linear-gradient(0deg, transparent 0%, black 12%);
|
.smooth-gradient-ease-in-out(mask-image, to top, black, 2.25rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.actor-name {
|
.actor-name {
|
||||||
|
|
@ -24,14 +24,17 @@
|
||||||
margin-bottom: -30px;
|
margin-bottom: -30px;
|
||||||
|
|
||||||
input[type='text'] {
|
input[type='text'] {
|
||||||
background-color: light-dark(@dark-15, @light-black);
|
backdrop-filter: none;
|
||||||
border: 1px solid transparent;
|
border: none;
|
||||||
|
font-family: @font-title;
|
||||||
font-size: var(--font-size-24);
|
font-size: var(--font-size-24);
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
box-shadow: unset;
|
||||||
|
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
|
||||||
|
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
outline: 2px solid transparent;
|
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
text-shadow: 1px 1px 2px light-dark(@soft-white-shadow, @light-black);
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
outline: 2px solid light-dark(@dark, @golden);
|
outline: 2px solid light-dark(@dark, @golden);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@import '../../../utils/colors.less';
|
@import '../../../utils/colors.less';
|
||||||
@import '../../../utils/fonts.less';
|
@import '../../../utils/fonts.less';
|
||||||
|
@import '../../../utils/mixin.less';
|
||||||
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.environment {
|
.application.sheet.daggerheart.actor.dh-style.environment {
|
||||||
.environment-header-sheet {
|
.environment-header-sheet {
|
||||||
|
|
@ -10,8 +11,8 @@
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
mask-image: linear-gradient(0deg, transparent 0%, black 20%);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
.smooth-gradient-ease-in-out(mask-image, to top, black, 3.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-container {
|
.item-container {
|
||||||
|
|
@ -21,10 +22,31 @@
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -40px;
|
top: -36px;
|
||||||
gap: 0 var(--spacer-12);
|
gap: 0 var(--spacer-12);
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
margin-bottom: -30px;
|
margin-bottom: -26px;
|
||||||
|
|
||||||
|
.item-name input[type='text'] {
|
||||||
|
backdrop-filter: none;
|
||||||
|
border: none;
|
||||||
|
font-family: @font-title;
|
||||||
|
font-size: var(--font-size-32);
|
||||||
|
text-align: start;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
|
||||||
|
|
||||||
|
padding-left: 0;
|
||||||
|
height: 2.625rem;
|
||||||
|
|
||||||
|
&:hover[type='text'],
|
||||||
|
&:focus[type='text'] {
|
||||||
|
box-shadow: none;
|
||||||
|
outline: 2px solid light-dark(@dark-blue, @golden);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.flexrow {
|
.flexrow {
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
|
|
@ -107,26 +129,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-name {
|
|
||||||
input[type='text'] {
|
|
||||||
background-color: light-dark(@dark-15, @light-black);
|
|
||||||
border: 1px solid transparent;
|
|
||||||
font-size: var(--font-size-32);
|
|
||||||
height: 2.625rem;
|
|
||||||
text-align: start;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
text-shadow: 1px 1px 2px light-dark(@soft-white-shadow, @light-black);
|
|
||||||
padding-left: 0;
|
|
||||||
|
|
||||||
&:hover[type='text'],
|
|
||||||
&:focus[type='text'] {
|
|
||||||
box-shadow: none;
|
|
||||||
outline: 2px solid light-dark(@dark-blue, @golden);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.environment-info {
|
.environment-info {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@import '../../../utils/colors.less';
|
@import '../../../utils/colors.less';
|
||||||
@import '../../../utils/fonts.less';
|
@import '../../../utils/fonts.less';
|
||||||
|
@import '../../../utils/mixin.less';
|
||||||
|
|
||||||
.party-header-sheet {
|
.party-header-sheet {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -9,28 +10,32 @@
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
.smooth-gradient-ease-in-out(mask-image, to top, black, 3.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-container {
|
.item-container {
|
||||||
.item-name {
|
margin-top: -2rem;
|
||||||
padding: 0 20px;
|
z-index: 1;
|
||||||
input[type='text'] {
|
input.item-name[type='text'] {
|
||||||
font-size: 32px;
|
backdrop-filter: none;
|
||||||
height: 42px;
|
border: none;
|
||||||
|
font-family: @font-title;
|
||||||
|
font-size: var(--font-size-32);
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
box-shadow: unset;
|
||||||
|
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
outline: 2px solid transparent;
|
width: calc(100% - 40px);
|
||||||
border: 1px solid transparent;
|
height: 2.625rem;
|
||||||
|
|
||||||
&:hover[type='text'],
|
&:hover[type='text'],
|
||||||
&:focus[type='text'] {
|
&:focus[type='text'] {
|
||||||
box-shadow: none;
|
|
||||||
outline: 2px solid light-dark(@dark-blue, @golden);
|
outline: 2px solid light-dark(@dark-blue, @golden);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|
|
||||||
|
|
@ -114,3 +114,70 @@
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// A simple ease-out mask
|
||||||
|
.smooth-gradient-ease-out(@param, @to, @destination, @length) {
|
||||||
|
@{param}+: linear-gradient(
|
||||||
|
@to,
|
||||||
|
transparent 0%,
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.013)") calc(0.008 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.049)") calc(0.029 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.104)") calc(0.064 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.259)") calc(0.166 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.45)") calc(0.304 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.741)") calc(0.554 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.825)") calc(0.644 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.896)") calc(0.735 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.951)") calc(0.825 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.987)") calc(0.914 * @length),
|
||||||
|
@destination @length
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple ease in and out mask.
|
||||||
|
* @param - the parameter to add to
|
||||||
|
* @param - direction, such as "to top"
|
||||||
|
* @destination - the color at the destination. The origin is always transparent
|
||||||
|
* @length - the value at the destination
|
||||||
|
*/
|
||||||
|
.smooth-gradient-ease-in-out(@param, @to, @destination, @length: 100%) {
|
||||||
|
@{param}+: linear-gradient(
|
||||||
|
@to,
|
||||||
|
transparent 0%,
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.013)") calc(0.081 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.049)") calc(0.155 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.104)") calc(0.225 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.259)") calc(0.353 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.45)") calc(0.471 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.741)") calc(0.647 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.825)") calc(0.71 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.896)") calc(0.775 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.951)") calc(0.845 * @length),
|
||||||
|
rgb(from @destination r g b / ~"calc(alpha * 0.987)") calc(0.914 * @length),
|
||||||
|
@destination @length
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// .forNow {
|
||||||
|
// linear-gradient(
|
||||||
|
// to top,
|
||||||
|
// hsla(0, 0%, 0%, 0) 0%,
|
||||||
|
// hsla(0, 0%, 0%, 0.013) 0.8%,
|
||||||
|
// hsla(0, 0%, 0%, 0.049) 2.9%,
|
||||||
|
// hsla(0, 0%, 0%, 0.104) 6.4%,
|
||||||
|
// hsla(0, 0%, 0%, 0.175) 11%,
|
||||||
|
// hsla(0, 0%, 0%, 0.259) 16.6%,
|
||||||
|
// hsla(0, 0%, 0%, 0.352) 23.1%,
|
||||||
|
// hsla(0, 0%, 0%, 0.45) 30.4%,
|
||||||
|
// hsla(0, 0%, 0%, 0.55) 38.3%,
|
||||||
|
// hsla(0, 0%, 0%, 0.648) 46.7%,
|
||||||
|
// hsla(0, 0%, 0%, 0.741) 55.4%,
|
||||||
|
// hsla(0, 0%, 0%, 0.825) 64.4%,
|
||||||
|
// hsla(0, 0%, 0%, 0.896) 73.5%,
|
||||||
|
// hsla(0, 0%, 0%, 0.951) 82.5%,
|
||||||
|
// hsla(0, 0%, 0%, 0.987) 91.4%,
|
||||||
|
// hsl(0, 0%, 0%) 100%
|
||||||
|
// );
|
||||||
|
// };
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
||||||
<div class='item-container'>
|
<div class='item-container'>
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<h1 class='item-name'>
|
<input class="item-name" type='text' name='name' value='{{source.name}}' autocomplete="off" spellcheck="false"/>
|
||||||
<input type='text' name='name' value='{{source.name}}' autocomplete="off" spellcheck="false"/>
|
|
||||||
</h1>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue