datasette/datasette/static/app.css
Simon Willison 5a184a5d21 Display column type in column action menu, closes #993
Also added new documented db.table_column_details() introspection method.
2020-10-05 17:32:10 -07:00

449 lines
8.4 KiB
CSS

body {
margin: 0;
padding: 0;
font-family: "Helvetica Neue", sans-serif;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
.bd {
margin: 0 1em;
}
table {
border-collapse: collapse;
}
td {
border-top: 1px solid #aaa;
border-right: 1px solid #eee;
padding: 4px;
vertical-align: top;
white-space: pre-wrap;
}
td.col-link {
font-weight: bold;
}
td em {
font-style: normal;
font-size: 0.8em;
color: #aaa;
}
th {
padding-right: 1em;
white-space: nowrap;
}
table a:link {
text-decoration: none;
color: #445ac8;
}
table a:visited {
color: #8f54c4;
}
.small-screen-only,
.select-wrapper.small-screen-only {
display: none;
}
@media only screen and (max-width: 576px) {
.small-screen-only {
display: initial;
}
/* Force table to not be like tables anymore */
table.rows-and-columns,
.rows-and-columns thead,
.rows-and-columns tbody,
.rows-and-columns th,
.rows-and-columns td,
.rows-and-columns tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
.rows-and-columns thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
.rows-and-columns tr {
border: 1px solid #ccc;
margin-bottom: 1em;
}
.rows-and-columns td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
padding: 0;
padding-left: 10%;
}
.rows-and-columns td:before {
display: block;
color: black;
margin-left: -10%;
font-size: 0.8em;
}
}
.hd {
border-bottom: 2px solid #ccc;
padding: 0.2em 1em;
background-color: #eee;
overflow: hidden;
box-sizing: border-box;
min-height: 2rem;
}
.hd p {
margin: 0;
padding: 0;
}
.hd .crumbs {
float: left;
}
.hd .logout {
float: right;
text-align: right;
padding-left: 1em;
}
.hd .logout form {
display: inline;
}
.ft {
margin: 1em 0;
padding: 0.5em 1em 0 1em;
border-top: 1px solid #ccc;
font-size: 0.8em;
}
.hd :link {
text-decoration: none;
}
.db-table p {
margin-top: 0;
margin-bottom: 0.3em;
}
.db-table h2 {
margin-top: 1em;
margin-bottom: 0;
}
h2 em {
font-style: normal;
font-weight: lighter;
}
.extra-wheres ul, .extra-wheres li {
list-style-type: none;
padding: 0;
margin: 0;
}
form.sql textarea {
border: 1px solid #ccc;
width: 70%;
height: 3em;
padding: 4px;
font-family: monospace;
font-size: 1.3em;
}
form label {
font-weight: bold;
display: inline-block;
width: 15%;
}
.advanced-export form label {
width: auto;
}
.advanced-export input[type=submit] {
font-size: 0.6em;
margin-left: 1em;
}
label.sort_by_desc {
width: auto;
padding-right: 1em;
}
form input[type=text],
form input[type=search] {
border: 1px solid #ccc;
border-radius: 3px;
width: 60%;
padding: 9px 4px;
display: inline-block;
font-size: 1em;
font-family: Helvetica, sans-serif;
}
/* Stop Webkit from styling search boxes in an inconsistent way */
/* https://css-tricks.com/webkit-html5-search-inputs/ comments */
input[type=search] {
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
display: none;
}
@media only screen and (max-width: 576px) {
form.sql textarea {
width: 95%;
}
}
form input[type=submit], form button[type=button] {
font-weight: 400;
cursor: pointer;
text-align: center;
vertical-align: middle;
border-width: 1px;
border-style: solid;
padding: .5em 0.8em;
font-size: 0.9rem;
line-height: 1;
border-radius: .25rem;
}
form input[type=submit] {
color: #fff;
background-color: #007bff;
border-color: #007bff;
-webkit-appearance: button;
}
form button[type=button] {
color: #007bff;
background-color: #fff;
border-color: #007bff;
}
.filter-row {
margin-bottom: 0.6em;
}
.search-row {
margin-bottom: 1.8em;
}
.search-row label {
font-size: 1.2em;
padding-right: 0.5em;
display: inline-block;
width: 80px;
}
.select-wrapper {
border: 1px solid #ccc;
width: 120px;
border-radius: 3px;
padding: 0;
background-color: #fafafa;
position: relative;
display: inline-block;
margin-right: 0.3em;
}
.select-wrapper.filter-op {
width: 80px;
}
.select-wrapper::after {
content: "\25BE";
position: absolute;
top: 0px;
right: 0.4em;
color: #bbb;
pointer-events: none;
font-size: 1.2em;
padding-top: 0.16em;
}
.select-wrapper select {
padding: 9px 8px;
width: 100%;
border: none;
box-shadow: none;
background: transparent;
background-image: none;
-webkit-appearance: none;
-moz-appearance: none;
cursor: pointer;
}
.select-wrapper select {
font-size: 1em;
font-family: Helvetica, sans-serif;
}
.select-wrapper option {
font-size: 1em;
font-family: Helvetica, sans-serif;
}
.select-wrapper select:focus {
outline: none;
}
.filters {
font-size: 0.8em;
}
.filters input.filter-value {
width: 200px;
border-radius: 3px;
-webkit-appearance: none;
padding: 9px 4px;
font-size: 1em;
font-family: Helvetica, sans-serif;
}
@media only screen and (max-width: 576px) {
.select-wrapper.small-screen-only {
display: inline-block;
}
.select-wrapper {
width: 100px;
}
.select-wrapper.filter-op {
width: 60px;
}
.filters input.filter-value {
width: 140px;
}
}
a.not-underlined {
text-decoration: none;
}
.not-underlined .underlined {
text-decoration: underline;
}
.facet-results {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.facet-info {
width: 250px;
margin-right: 15px;
}
.facet-info li,
.facet-info ul {
margin: 0;
padding: 0;
}
.facet-info ul {
padding-left: 1.25em;
margin-bottom: 1em;
}
.facet-info a.cross:link,
.facet-info a.cross:visited,
.facet-info a.cross:hover,
.facet-info a.cross:focus,
.facet-info a.cross:active {
text-decoration: none;
}
.advanced-export {
margin-top: 1em;
padding: 0.01em 2em 0.01em 1em;
width: auto;
display: inline-block;
box-shadow: 1px 2px 8px 2px rgba(0,0,0,0.08);
}
.download-sqlite em {
font-style: normal;
font-size: 0.8em;
}
pre.wrapped-sql {
white-space: pre-wrap;
}
p.zero-results {
border: 2px solid #ccc;
background-color: #eee;
padding: 0.5em;
font-style: italic;
}
/* Value types */
.type-float, .type-int {
color: #666;
}
.message-info {
padding: 1em;
border: 1px solid green;
background-color: #c7fbc7;
}
.message-warning {
padding: 1em;
border: 1px solid #ae7100;
background-color: #fbdda5;
}
.message-error {
padding: 1em;
border: 1px solid red;
background-color: pink;
}
button.button-as-link {
background: none;
border: none;
padding: 0;
color: blue;
text-decoration: none;
cursor: pointer;
font-size: 1em;
}
svg.dropdown-menu-icon {
display: inline-block;
position: relative;
top: 2px;
cursor: pointer;
opacity: 0.8;
}
.dropdown-menu {
border: 1px solid #ccc;
border-radius: 4px;
line-height: 1.4;
font-size: 16px;
box-shadow: 2px 2px 2px #aaa;
background-color: #fff;
}
.dropdown-menu ul,
.dropdown-menu li {
list-style-type: none;
margin: 0;
padding: 0;
}
.dropdown-menu .dropdown-column-type {
font-size: 0.7em;
color: #666;
margin: 0;
padding: 0;
padding: 4px 8px 4px 8px;
}
.dropdown-menu li {
border-bottom: 1px solid #ccc;
}
.dropdown-menu li:last-child {
border: none;
}
.dropdown-menu a:link,
.dropdown-menu a:visited,
.dropdown-menu a:hover,
.dropdown-menu a:focus
.dropdown-menu a:active {
text-decoration: none;
display: block;
padding: 4px 8px 2px 8px;
color: #222;
white-space: nowrap;
}
.dropdown-menu a:hover {
background-color: #eee;
}
.dropdown-menu .hook {
display: block;
position: absolute;
top: -5px;
left: 6px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid #666;
}