Skip to content

Commit

Permalink
Import styles as CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
queicherius committed Sep 30, 2017
1 parent 365e04a commit f3c5712
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 34 deletions.
34 changes: 0 additions & 34 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,6 @@
<title>GW2 API STATUS</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.min.css">
<style>
.has-tooltip { position: relative; }
.has-tooltip:hover .status-tooltip { opacity: 1; }
.status-tooltip {
opacity: 0;
transition: opacity ease .3s;
pointer-events: none;
position: absolute;
left: 50%;
top: -5px;
transform: translate(-50%, -100%);
background: black;
border-radius: 3px;
white-space: nowrap;
color: #fff;
padding: 2px 8px;
font-size: 12px;
}
.status-tooltip:after {
content: '';
display: block;
border: solid;
border-width: 6px 6px 0 6px;
border-color: black transparent;
position: absolute;
left: 50%;
margin-left: -6px;
bottom: -6px;

.result-row--summary:hover {
cursor: pointer;
background: #f7f7f7;
}
</style>
</head>
<body>
<noscript>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {h, render} from 'preact'
import App from './App'
import './styles.css'

render(<App />, document.getElementById('root'))
40 changes: 40 additions & 0 deletions frontend/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.has-tooltip {
position: relative;
}

.has-tooltip:hover .status-tooltip {
opacity: 1;
}

.status-tooltip {
opacity: 0;
transition: opacity ease .3s;
pointer-events: none;
position: absolute;
left: 50%;
top: -5px;
transform: translate(-50%, -100%);
background: black;
border-radius: 3px;
white-space: nowrap;
color: #fff;
padding: 2px 8px;
font-size: 12px;
}

.status-tooltip:after {
content: '';
display: block;
border: solid;
border-width: 6px 6px 0 6px;
border-color: black transparent;
position: absolute;
left: 50%;
margin-left: -6px;
bottom: -6px;
}

.result-row--summary:hover {
cursor: pointer;
background: #f7f7f7;
}

0 comments on commit f3c5712

Please sign in to comment.