UNPKG

radix-library

Version:

CSS and Javascript library to initialize pages.

639 lines (538 loc) 11.6 kB
@charset "UTF-8"; /************************************ RADIX - Version : 4.0.1 Copyright 2021 shoalwave and other contributors. Released under the MIT License. https://github.com/7304sk/RADIX/blob/main/LICENSE.txt ************************************/ :root { --fontSize: 16px; --linkColor: #3562a0; --textColor: #333; --gutter: 1.3rem; /* spacing of paragraph. */ --gap: 3rem; /* spacing of sections. */ --spacing: 1rem; /* minimum spacing between content area and viewport. */ --contentWidth: 1000px; } /* reset default style */ *:where(:not(iframe, canvas, img, svg, video):not(svg *)) { all: unset; display: revert; } *, *:before, *:after { box-sizing: border-box; } [hidden] { display: none !important } /* font setting */ html { color: var(--textColor); font-family: 'Noto Sans JP', Arial, "Hiragino Kaku Gothic Pro", Meiryo, "MS PGothic", sans-serif; font-size: var(--fontSize); font-weight: 400; line-height: 1.4 } p { line-height: 1.8 } /* fix display height */ body { display: flex; flex-direction: column; min-height: 100vh; -moz-text-size-adjust: 100%; text-size-adjust: 100% } main { display: block; flex-grow: 1 } /* formatting init style */ a { color: var(--linkColor); text-decoration: none; cursor: pointer } a:hover { text-decoration: underline } ul, ol { list-style-type: none } ul.disc, ol.disc { padding-left: 1.5em; list-style-type: disc } ul.circle, ol.circle { padding-left: 1.5em; list-style-type: circle } ul.square, ol.square { padding-left: 1.5em; list-style-type: square } ul.decimal, ol.decimal { padding-left: 1.5em; list-style-type: decimal } ul.decimal-lz, ol.decimal-lz { padding-left: 2.5em; list-style-type: decimal-leading-zero } blockquote, q { quotes: none } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none } sup { font-size: 0.5em; vertical-align: super } sub { font-size: 0.5em; vertical-align: sub } strong { font-weight: bolder } em { font-weight: 700 } table { width: max-content; border-collapse: collapse; border-spacing: 0 } button { cursor: pointer } section { margin-bottom: var(--gap) } img { display: block; object-fit: cover; max-width: 100%; flex-shrink: 0 } img.contain { object-fit: contain } /* margin-bottom settings */ main { margin-bottom: auto; } main h1 { margin-bottom: var(--gutter) } main h2 { margin-bottom: calc(var(--gutter) - .3rem) } main h3 { margin-bottom: calc(var(--gutter) - .5rem) } main h4 { margin-bottom: calc(var(--gutter) - .7rem) } main h5 { margin-bottom: calc(var(--gutter) - .7rem) } main h6 { margin-bottom: calc(var(--gutter) - .7rem) } main ul { padding-left: 1.5em; margin-bottom: var(--gutter); list-style-type: disc } main ol { padding-left: 1.5em; margin-bottom: var(--gutter); list-style-type: decimal } main table, main dl { margin-bottom: var(--gutter) } main p, .mb { margin-bottom: var(--gutter) } .mb0 { margin-bottom: 0 } .mb_ { margin-bottom: .5rem } .mb1 { margin-bottom: 1rem } .mb1_ { margin-bottom: 1.5rem } .mb2 { margin-bottom: 2rem } .mb2_ { margin-bottom: 2.5rem } .mb3 { margin-bottom: 3rem } /* unique style */ .clearfix:after { content: " "; display: block; clear: both } .centering { display: block; margin: auto; width: 100%; max-width: var(--contentWidth); position: relative } .fb-brackets { display: grid; grid-template-columns: var(--spacing) 1fr min(calc(100% - 2 * var(--spacing)), var(--contentWidth)) 1fr var(--spacing); grid-auto-rows: max-content; width: 100%; } .fb-brackets>*:not(.full-bleed) { grid-column: 3 } .fb-brackets>.full-bleed { grid-column: 1/-1 } .hide { visibility: hidden; opacity: 0 } .visible { visibility: visible; opacity: 1 } .radix-modal-visible:not(.rdx-modal-item) { display: none !important } .none { display: none !important } .fill-parent { display: block; width: 100%; height: 100% } .text-center { text-align: center } .text-right { text-align: right } .text-left { text-align: left } .text-unit { display: inline-block; vertical-align: top } .text-clear { font: 0/0 a; color: transparent; text-shadow: none; white-space: nowrap } /* printing style */ @media print { @page { size: A4 portrait; margin: 12.7mm 9.7mm; } * { -webkit-print-color-adjust: exact; font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", "sans-serif"; } body { overflow-x: visible !important; overflow-y: visible !important; width: calc(var(--contentWidth) + 200px) !important; } .centering { width: var(--contentWidth); } iframe { background: #ccc; } } /** flex fix */ .rdx-dummy-item { height: 0 !important; min-height: 0 !important; max-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; opacity: 0 !important; visibility: hidden !important; overflow: hidden !important } /** scroll appear */ .rdx-scroll-appear { transition: .5s ease-out; } .rdx-scroll-appear:not(.active) { opacity: 0; transform: scale(.9) translateY(-5.56%); } /* SVG icon */ .radix-icon { display: inline; height: 1.2em; vertical-align: sub; } .rdx-icon-hamburger .bar1, .rdx-icon-hamburger .bar2, .rdx-icon-hamburger .bar3 { stroke-linecap: butt; stroke-linejoin: miter; stroke-width: 4px; stroke: currentColor; transition: .2s all linear; transform: rotate(0); opacity: 1; } .opened .rdx-icon-hamburger .bar1 { transform: rotate(45deg) scale(1.2) translate(10%, -27%); } .opened .rdx-icon-hamburger .bar2 { opacity: 0; } .opened .rdx-icon-hamburger .bar3 { transform: rotate(-45deg) scale(1.2) translate(-50%, -15%); } /* drag scroll */ @keyframes rdx-drag-hint { 0% { transform: translate(0) } 5% { transform: translate(-7%) } 10% { transform: translate(7%) } 15% { transform: translate(-7%) } 20% { transform: translate(7%) } 25% { transform: translate(0) } } .rdx-drag-hint { display: grid; width: 100%; height: 100%; place-items: center; position: absolute; top: 0; left: 0; z-index: 2; background: rgba(0, 0, 0, 0.3); transition: .3s; } .rdx-drag-hint-inner { display: flex; flex-direction: column; align-items: center; max-width: calc(100% - 2rem); max-height: calc(100% - 2rem); color: #fff; line-height: 1; animation: rdx-drag-hint 2s infinite linear; animation-delay: 1s; } .rdx-drag-hint .radix-icon { height: auto; } .rdx-drag-hint .rdx-drag-hint-text { padding: 0 .8rem; font-size: 1.5em; } /* modal */ .rdx-modal-viewport { --rmv-bg-color: rgba(0, 0, 0, 0.85); --rmv-text-color: #fff; --rmv-light: rgba(255, 255, 255, .3); --rmv-dark: rgba(0, 0, 0, .3); height: 100%; width: 100%; position: fixed; top: 0; left: 0; z-index: 2147483647; padding: 5em 1em 2em; background-color: var(--rmv-bg-color); opacity: 0; visibility: hidden; transition: .2s ease-in opacity, .2s ease-in visibility; font-size: 16px; } .rdx-modal-viewport.black { --rmv-bg-color: rgba(0, 0, 0, 0.85); --rmv-text-color: #fff; --rmv-light: rgba(255, 255, 255, .3); --rmv-dark: rgba(0, 0, 0, .3); } .rdx-modal-viewport.white { --rmv-bg-color: rgba(255, 255, 255, 0.85); --rmv-text-color: #666; --rmv-light: rgba(0, 0, 0, .3); --rmv-dark: rgba(255, 255, 255, .3); } .rdx-modal-viewport.black-opacity { --rmv-bg-color: rgba(0, 0, 0, 1); --rmv-text-color: #fff; --rmv-light: rgba(255, 255, 255, .3); --rmv-dark: rgba(0, 0, 0, .3); } .rdx-modal-viewport.white-opacity { --rmv-bg-color: rgba(255, 255, 255, 1); --rmv-text-color: #666; --rmv-light: rgba(0, 0, 0, .3); --rmv-dark: rgba(255, 255, 255, .3); } .rdx-modal-viewport.active { opacity: 1; visibility: visible; } .rdx-modal-area { display: grid; place-items: center; width: 100%; height: 100%; } .rdx-modal-toggles { display: flex; position: absolute; top: 0; right: 0; transform: translateY(-100%); opacity: 0; color: var(--rmv-text-color); transition: .4s ease-out; } .rdx-modal-viewport.active .rdx-modal-toggles { transform: translateY(0); opacity: 1; } .rdx-modal-magnifier { display: flex; align-items: center; gap: .5em; position: relative; } .rdx-modal-enlarge, .rdx-modal-shrink { display: block; font-size: 2em; cursor: pointer; } .rdx-modal-scale { display: grid; place-items: center; height: 40px; padding: 0 1em; margin-right: .5em; border: 3px solid currentColor; font-size: 1.3em; font-weight: 900; line-height: 1; cursor: pointer; } .rdx-modal-scale:hover { background: var(--rmv-light); } .rdx-modal-scaler { display: block; height: 100%; position: absolute; top: 50%; left: 0; transform: translateY(-50%); padding: 20px 0; background: var(--rmv-text-color); color: var(--rmv-bg-color); overflow-y: auto; opacity: 0; visibility: hidden; transition: .1s ease-in; } .rdx-modal-scaler.active { opacity: 1; visibility: visible; } .rdx-modal-scaler li { display: grid; height: 40px; place-items: center; padding: 0 1em; font-size: 1.3em; font-weight: 900; line-height: 1; cursor: pointer; } .rdx-modal-scaler li:hover { background: var(--rmv-dark); } .rdx-modal-close { height: 3em; width: 3em; margin: 1em; cursor: pointer } .rdx-modal-wrapper { display: grid; max-width: 100%; max-height: 100%; overflow: auto; } .rdx-modal-wrapper::-webkit-scrollbar { width: 7px } .rdx-modal-wrapper::-webkit-scrollbar:horizontal { height: 7px } .rdx-modal-wrapper::-webkit-scrollbar-track { border-radius: 5px; box-shadow: inset 0 0 6px rgba(0, 0, 0, .2); } .rdx-modal-wrapper::-webkit-scrollbar-thumb { background-color: #777; border-radius: 5px; } .rdx-modal-wrapper::-webkit-scrollbar-corner { background: transparent; } .rdx-modal-frame { overflow: hidden; } .rdx-modal-content { width: max-content; height: max-content; cursor: default; transform-origin: top left; } .rdx-modal-content > img.rdx-modal-item { display: block; } .rdx-modal-source { cursor: pointer; }