forked from kintesh/containerise
-
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 kintesh#109 from LoveIsGrief/preference-ui-design
Preference ui design suggestion
- Loading branch information
Showing
16 changed files
with
227 additions
and
50 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import css from '!!raw-loader!./styles/InformationElement.css'; | ||
import {createEl} from './utils'; | ||
|
||
class InfoTooltip extends HTMLElement { | ||
constructor() { | ||
super(); | ||
let shadow = this.attachShadow({mode: 'open'}); | ||
shadow.appendChild(createEl(`<style>${css}</style>`)); | ||
shadow.appendChild(createEl(`<span class="wrapper"> | ||
<span class="icon">i</span> | ||
<span class="info">${this.textContent}</span> | ||
</span> | ||
`)); | ||
|
||
} | ||
|
||
} | ||
|
||
customElements.define('info-tooltip', InfoTooltip); |
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
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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.pref-container { | ||
margin: 5px; | ||
flex-grow: 1; | ||
} | ||
|
||
.pref-container > .preferences { | ||
display: flex; | ||
flex-direction: column; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pref-group.pref-containers > .preferences{ | ||
margin: 0; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
:host { | ||
--size: 15px; | ||
all: initial; | ||
} | ||
|
||
:host([text='']) { | ||
display: none; | ||
} | ||
|
||
.wrapper { | ||
position: relative; | ||
display: inline-flex; | ||
vertical-align: top; | ||
} | ||
|
||
.icon { | ||
text-shadow: blue 5px 2px 5px; | ||
position: relative; | ||
font-style: oblique; | ||
color: white; | ||
border-color: white; | ||
border-width: 1px; | ||
border-style: solid; | ||
background: cadetblue; | ||
border-radius: var(--size); | ||
line-height: var(--size); | ||
font-size: var(--size); | ||
width: var(--size); | ||
height: var(--size); | ||
text-align: center; | ||
padding: 1px; | ||
} | ||
|
||
|
||
.info { | ||
font-size: 0.8rem; | ||
width: 200px; | ||
display: inline-block; | ||
border: 1px solid black; | ||
padding: 10px; | ||
background: black; | ||
color: beige; | ||
border-radius: 10px; | ||
opacity: 0; | ||
transition: 0.6s all; | ||
position: absolute; | ||
bottom: 20px; | ||
left: 10px; | ||
z-index: 3; | ||
pointer-events: none; | ||
} | ||
|
||
.icon:hover + .info, .icon:focus + .info { | ||
opacity: 1; | ||
} |
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.