2,710
回編集
編集の要約なし |
編集の要約なし |
||
| 2,028行目: | 2,028行目: | ||
} | } | ||
/* ========================================================= | /* ========================================================= | ||
転スラWiki 外部画像スライドギャラリー | 転スラWiki 外部画像スライドギャラリー 完全版 | ||
・画像を切り抜かない | |||
・高さを統一 | |||
・PCでは横並び+左右ボタン | |||
・スマホでは横スワイプ | |||
========================================================= */ | ========================================================= */ | ||
.ts-gallery { | .mw-parser-output .ts-gallery { | ||
position: relative !important; | position: relative !important; | ||
display: block !important; | display: block !important; | ||
width: 100% !important; | width: 100% !important; | ||
max-width: 100% !important; | max-width: 100% !important; | ||
margin: 0.8em 0 1.5em !important; | margin: 0.8em 0 1.5em !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
} | } | ||
/* ========================================================= | /* ========================================================= | ||
| 2,049行目: | 2,049行目: | ||
========================================================= */ | ========================================================= */ | ||
.ts-gallery | .mw-parser-output .ts-gallery .ts-gallery__track { | ||
display: flex !important; | display: flex !important; | ||
flex-direction: row !important; | flex-direction: row !important; | ||
| 2,059行目: | 2,059行目: | ||
gap: 12px !important; | gap: 12px !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
padding: 4px 44px 10px 0 !important; | padding: 4px 44px 10px 0 !important; | ||
| 2,070行目: | 2,069行目: | ||
scroll-snap-type: x mandatory; | scroll-snap-type: x mandatory; | ||
scroll-behavior: smooth; | scroll-behavior: smooth; | ||
-webkit-overflow-scrolling: touch; | -webkit-overflow-scrolling: touch; | ||
scrollbar-width: thin; | scrollbar-width: thin; | ||
scrollbar-color: #a2a9b1 transparent; | |||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__track::-webkit-scrollbar { | |||
height: 6px; | |||
} | |||
.mw-parser-output .ts-gallery .ts-gallery__track::-webkit-scrollbar-track { | |||
background: transparent; | |||
} | |||
.mw-parser-output .ts-gallery .ts-gallery__track::-webkit-scrollbar-thumb { | |||
background: #a2a9b1; | |||
border-radius: 999px; | |||
} | |||
/* ========================================================= | /* ========================================================= | ||
| 2,081行目: | 2,092行目: | ||
========================================================= */ | ========================================================= */ | ||
. | .mw-parser-output .ts-gallery .ts-gallery__item { | ||
position: relative !important; | position: relative !important; | ||
display: block !important; | display: block !important; | ||
flex: 0 0 360px !important; | flex: 0 0 360px !important; | ||
width: 360px !important; | width: 360px !important; | ||
min-width: 360px !important; | min-width: 360px !important; | ||
| 2,097行目: | 2,106行目: | ||
border: 1px solid #a2a9b1 !important; | border: 1px solid #a2a9b1 !important; | ||
border-radius: 5px !important; | border-radius: 5px !important; | ||
background: #fff !important; | background: #fff !important; | ||
overflow: hidden !important; | overflow: hidden !important; | ||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
scroll-snap-align: start; | scroll-snap-align: start; | ||
} | } | ||
/* ========================================================= | /* ========================================================= | ||
| 2,112行目: | 2,117行目: | ||
========================================================= */ | ========================================================= */ | ||
. | .mw-parser-output .ts-gallery .ts-gallery__imagebox { | ||
display: flex !important; | display: flex !important; | ||
align-items: center !important; | align-items: center !important; | ||
| 2,122行目: | 2,123行目: | ||
width: 100% !important; | width: 100% !important; | ||
height: 300px !important; | height: 300px !important; | ||
min-height: 300px !important; | min-height: 300px !important; | ||
| 2,131行目: | 2,131行目: | ||
background: #f8f9fa !important; | background: #f8f9fa !important; | ||
overflow: hidden !important; | |||
box-sizing: border-box !important; | |||
/* 余計なベースライン隙間防止 */ | |||
line-height: 0 !important; | |||
font-size: 0 !important; | |||
} | |||
/* ========================================================= | |||
MediaWikiが挿入する可能性があるラッパーを全部無害化 | |||
ここが超重要 | |||
========================================================= */ | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > p, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > a, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > span, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > div, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > p > a, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > div > a, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > span > a, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > p > span, | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox > div > span { | |||
display: flex !important; | |||
align-items: center !important; | |||
justify-content: center !important; | |||
width: 100% !important; | |||
height: 100% !important; | |||
max-width: 100% !important; | |||
max-height: 100% !important; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
border: 0 !important; | |||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
line-height: 0 !important; | |||
font-size: 0 !important; | |||
} | } | ||
/* pタグが入っても余白を出さない */ | |||
.mw-parser-output .ts-gallery .ts-gallery__imagebox p { | |||
margin: 0 !important; | |||
} | |||
/* ========================================================= | /* ========================================================= | ||
画像本体 | 画像本体 | ||
画像全体を必ず表示(切り抜かない) | |||
========================================================= */ | ========================================================= */ | ||
. | .mw-parser-output .ts-gallery .ts-gallery__imagebox img { | ||
display: block !important; | display: block !important; | ||
| 2,156行目: | 2,190行目: | ||
max-width: 100% !important; | max-width: 100% !important; | ||
max-height: 100% !important; | max-height: 100% !important; | ||
min-width: 0 !important; | |||
min-height: 0 !important; | |||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
border: 0 !important; | border: 0 !important; | ||
box-shadow: none !important; | |||
object-fit: contain !important; | object-fit: contain !important; | ||
object-position: center center !important; | object-position: center center !important; | ||
background: transparent !important; | |||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
vertical-align: top !important; | |||
} | } | ||
/* ========================================================= | /* ========================================================= | ||
| 2,173行目: | 2,210行目: | ||
========================================================= */ | ========================================================= */ | ||
. | .mw-parser-output .ts-gallery .ts-gallery__caption { | ||
display: block !important; | display: block !important; | ||
width: 100% !important; | width: 100% !important; | ||
| 2,186行目: | 2,218行目: | ||
background: #fff !important; | background: #fff !important; | ||
color: #202122 !important; | color: #202122 !important; | ||
| 2,192行目: | 2,223行目: | ||
line-height: 1.6 !important; | line-height: 1.6 !important; | ||
box-sizing: border-box !important; | |||
overflow-wrap: anywhere; | overflow-wrap: anywhere; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__source { | |||
.ts-gallery__source { | color: #54595d !important; | ||
color: #54595d; | font-size: 11px !important; | ||
font-size: 11px; | line-height: 1.55 !important; | ||
} | } | ||
/* ========================================================= | /* ========================================================= | ||
| 2,208行目: | 2,237行目: | ||
========================================================= */ | ========================================================= */ | ||
.ts-gallery | .mw-parser-output .ts-gallery .ts-gallery__nav { | ||
position: absolute !important; | position: absolute !important; | ||
top: 154px !important; | top: 154px !important; | ||
z-index: 20 !important; | z-index: 20 !important; | ||
| 2,234行目: | 2,261行目: | ||
line-height: 1 !important; | line-height: 1 !important; | ||
box-shadow: 0 1px 5px rgba(0,0,0,.2); | box-shadow: 0 1px 5px rgba(0,0,0,.2) !important; | ||
cursor: pointer !important; | cursor: pointer !important; | ||
transform: translateY(-50%); | transform: translateY(-50%); | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__prev { | |||
.ts-gallery | |||
left: 8px !important; | left: 8px !important; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__next { | |||
.ts-gallery | |||
right: 8px !important; | right: 8px !important; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__nav:disabled { | |||
.ts-gallery | |||
opacity: .25 !important; | opacity: .25 !important; | ||
} | } | ||
.mw-parser-output .ts-gallery:not(.ts-gallery--scrollable) .ts-gallery__nav { | |||
display: none !important; | |||
} | |||
/* ========================================================= | /* ========================================================= | ||
スマホ | |||
========================================================= */ | ========================================================= */ | ||
@media screen and (max-width: 720px) { | @media screen and (max-width: 720px) { | ||
.ts-gallery { | .mw-parser-output .ts-gallery { | ||
margin: 0.6em 0 1.2em !important; | margin: 0.6em 0 1.2em !important; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__track { | |||
.ts-gallery | |||
gap: 9px !important; | gap: 9px !important; | ||
padding: 3px 28px 8px 0 !important; | |||
padding: | |||
scrollbar-width: none; | scrollbar-width: none; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__track::-webkit-scrollbar { | |||
.ts-gallery | |||
display: none; | display: none; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__item { | |||
. | flex: 0 0 calc(100% - 28px) !important; | ||
width: calc(100% - 28px) !important; | |||
min-width: calc(100% - 28px) !important; | |||
max-width: calc(100% - 28px) !important; | |||
flex: | |||
width: | |||
min-width: | |||
max-width: | |||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__imagebox { | |||
. | |||
height: 250px !important; | height: 250px !important; | ||
min-height: 250px !important; | min-height: 250px !important; | ||
| 2,321行目: | 2,315行目: | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__nav { | |||
.ts-gallery | |||
top: 128px !important; | top: 128px !important; | ||
width: 34px !important; | width: 34px !important; | ||
height: 34px !important; | height: 34px !important; | ||
font-size: 23px !important; | font-size: 23px !important; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__prev { | |||
.ts-gallery | |||
left: 5px !important; | left: 5px !important; | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__next { | |||
.ts-gallery | |||
right: 5px !important; | right: 5px !important; | ||
} | } | ||
} | } | ||
@media screen and (max-width: 380px) { | @media screen and (max-width: 380px) { | ||
. | .mw-parser-output .ts-gallery .ts-gallery__imagebox { | ||
height: 220px !important; | height: 220px !important; | ||
min-height: 220px !important; | min-height: 220px !important; | ||
| 2,360行目: | 2,339行目: | ||
} | } | ||
.mw-parser-output .ts-gallery .ts-gallery__nav { | |||
.ts-gallery | |||
top: 113px !important; | top: 113px !important; | ||
} | } | ||
} | } | ||