「MediaWiki:Common.css」の版間の差分

編集の要約なし
編集の要約なし
編集の要約なし
 
(同じ利用者による、間の8版が非表示)
2,028行目: 2,028行目:
}
}
/* =========================================================
/* =========================================================
   外部画像ギャラリー
   転スラWiki 外部画像スライドギャラリー 完全版
  ・画像を切り抜かない
  ・高さを統一
  ・PCでは横並び+左右ボタン
  ・スマホでは横スワイプ
   ========================================================= */
   ========================================================= */


.ts-gallery {
.mw-parser-output .ts-gallery {
position: relative;
position: relative !important;
width: 100%;
display: block !important;
margin: 1em 0 1.5em;
width: 100% !important;
box-sizing: border-box;
max-width: 100% !important;
}
margin: 0.8em 0 1.5em !important;
 
padding: 0 !important;
.ts-gallery__title {
box-sizing: border-box !important;
margin: 0 0 0.6em;
font-size: 1.05em;
font-weight: 700;
}
}


/* =========================================================
/* =========================================================
2,049行目: 2,049行目:
   ========================================================= */
   ========================================================= */


.ts-gallery__track {
.mw-parser-output .ts-gallery .ts-gallery__track {
display: flex;
display: flex !important;
align-items: flex-start;
flex-direction: row !important;
gap: 12px;
flex-wrap: nowrap !important;
align-items: flex-start !important;


width: 100%;
width: 100% !important;
overflow-x: auto;
max-width: 100% !important;
overflow-y: hidden;


padding: 4px 46px 12px 2px;
gap: 12px !important;
margin: 0 !important;
padding: 4px 44px 10px 0 !important;


box-sizing: border-box;
overflow-x: auto !important;
overflow-y: hidden !important;
 
box-sizing: border-box !important;


scroll-snap-type: x mandatory;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
overscroll-behavior-x: contain;


scrollbar-width: thin;
scrollbar-width: thin;
scrollbar-color: #a2a9b1 transparent;
}
}


.ts-gallery__track::-webkit-scrollbar {
.mw-parser-output .ts-gallery .ts-gallery__track::-webkit-scrollbar {
height: 6px;
height: 6px;
}
}


.ts-gallery__track::-webkit-scrollbar-thumb {
.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;
background: #a2a9b1;
border-radius: 10px;
border-radius: 999px;
}
}


/* =========================================================
/* =========================================================
   1枚ごとのカード
   カード
   ========================================================= */
   ========================================================= */


.ts-gallery__item {
.mw-parser-output .ts-gallery .ts-gallery__item {
/*
position: relative !important;
* PCでは1枚 約360px
display: block !important;
*/
 
flex: 0 0 360px !important;
flex: 0 0 360px !important;
width: 360px !important;
width: 360px !important;
min-width: 360px !important;
max-width: 360px !important;
max-width: 360px !important;


min-width: 0;
margin: 0 !important;
padding: 0 !important;
 
border: 1px solid #a2a9b1 !important;
border-radius: 5px !important;
background: #fff !important;
overflow: hidden !important;
 
box-sizing: border-box !important;
scroll-snap-align: start;
}
 
/* =========================================================
  画像表示領域
  ========================================================= */
 
.mw-parser-output .ts-gallery .ts-gallery__imagebox {
display: flex !important;
align-items: center !important;
justify-content: center !important;
 
width: 100% !important;
height: 300px !important;
min-height: 300px !important;
max-height: 300px !important;
 
margin: 0 !important;
padding: 0 !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;
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;
 
width: 100% !important;
height: 100% !important;
 
max-width: 100% !important;
max-height: 100% !important;
min-width: 0 !important;
min-height: 0 !important;
 
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
box-shadow: none !important;
 
object-fit: contain !important;
object-position: center center !important;
 
background: transparent !important;
box-sizing: border-box !important;
vertical-align: top !important;
}
 
/* =========================================================
  キャプション
  ========================================================= */
 
.mw-parser-output .ts-gallery .ts-gallery__caption {
display: block !important;
width: 100% !important;
 
margin: 0 !important;
padding: 10px 12px 12px !important;
 
background: #fff !important;
color: #202122 !important;
 
font-size: 12px !important;
line-height: 1.6 !important;
 
box-sizing: border-box !important;
overflow-wrap: anywhere;
}
 
.mw-parser-output .ts-gallery .ts-gallery__source {
color: #54595d !important;
font-size: 11px !important;
line-height: 1.55 !important;
}
 
/* =========================================================
  左右ボタン
  ========================================================= */
 
.mw-parser-output .ts-gallery .ts-gallery__nav {
position: absolute !important;
top: 154px !important;
z-index: 20 !important;
 
display: flex !important;
align-items: center !important;
justify-content: center !important;
 
width: 40px !important;
height: 40px !important;
 
margin: 0 !important;
padding: 0 !important;
 
border: 1px solid #a2a9b1 !important;
border-radius: 50% !important;
 
background: rgba(255,255,255,.92) !important;
color: #202122 !important;
 
font-size: 26px !important;
line-height: 1 !important;
 
box-shadow: 0 1px 5px rgba(0,0,0,.2) !important;
cursor: pointer !important;
transform: translateY(-50%);
}
 
.mw-parser-output .ts-gallery .ts-gallery__prev {
left: 8px !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__next {
right: 8px !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__nav:disabled {
opacity: .25 !important;
}
 
.mw-parser-output .ts-gallery:not(.ts-gallery--scrollable) .ts-gallery__nav {
display: none !important;
}
 
/* =========================================================
  スマホ
  ========================================================= */
 
@media screen and (max-width: 720px) {
 
.mw-parser-output .ts-gallery {
margin: 0.6em 0 1.2em !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__track {
gap: 9px !important;
padding: 3px 28px 8px 0 !important;
scrollbar-width: none;
}
 
.mw-parser-output .ts-gallery .ts-gallery__track::-webkit-scrollbar {
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;
}
 
.mw-parser-output .ts-gallery .ts-gallery__imagebox {
height: 250px !important;
min-height: 250px !important;
max-height: 250px !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__nav {
top: 128px !important;
width: 34px !important;
height: 34px !important;
font-size: 23px !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__prev {
left: 5px !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__next {
right: 5px !important;
}
}
 
@media screen and (max-width: 380px) {
 
.mw-parser-output .ts-gallery .ts-gallery__imagebox {
height: 220px !important;
min-height: 220px !important;
max-height: 220px !important;
}
 
.mw-parser-output .ts-gallery .ts-gallery__nav {
top: 113px !important;
}
}
 
/* =========================================================
  Infobox 外部画像スライダー
  ========================================================= */
 
.ts-infobox-slider {
position: relative !important;
 
display: block !important;
 
width: 100% !important;
max-width: 100% !important;
 
margin: 0 !important;
padding: 0 !important;
 
box-sizing: border-box !important;
 
overflow: hidden !important;
}
 
 
/* =========================================================
  スライド領域
  ========================================================= */
 
.ts-infobox-slider__track {
display: flex !important;
flex-direction: row !important;
flex-wrap: nowrap !important;
 
width: 100% !important;
max-width: 100% !important;
 
margin: 0 !important;
padding: 0 !important;
 
overflow-x: auto !important;
overflow-y: hidden !important;
 
box-sizing: border-box !important;
 
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
 
-webkit-overflow-scrolling: touch;
overscroll-behavior-x: contain;
 
/* スクロールバーは非表示 */
scrollbar-width: none;
}
 
.ts-infobox-slider__track::-webkit-scrollbar {
display: none;
}
 
 
/* =========================================================
  1枚のスライド
  ========================================================= */
 
.ts-infobox-slider__slide {
position: relative !important;
 
display: block !important;
 
flex: 0 0 100% !important;
 
width: 100% !important;
min-width: 100% !important;
max-width: 100% !important;
 
margin: 0 !important;
padding: 0 !important;
 
box-sizing: border-box !important;


scroll-snap-align: start;
scroll-snap-align: start;
2,098行目: 2,424行目:


background: #fff;
background: #fff;
border: 1px solid #a2a9b1;
border-radius: 4px;
overflow: hidden;
box-sizing: border-box;
}
}




/* =========================================================
/* =========================================================
   画像枠
   画像表示領域
   ========================================================= */
   ========================================================= */


.ts-gallery__imagebox {
.ts-infobox-slider__imagebox {
display: flex !important;
align-items: center !important;
justify-content: center !important;
 
width: 100% !important;
 
/*
/*
* ここを全画像で完全に統一
* Infobox内なのでギャラリーより少しコンパクト
*/
*/
width: 100% !important;
height: 300px !important;
height: 300px !important;
min-height: 300px !important;
min-height: 300px !important;
max-height: 300px !important;
max-height: 300px !important;


display: flex !important;
margin: 0 !important;
align-items: center !important;
padding: 0 !important;
justify-content: center !important;
 
background: #f8f9fa !important;


overflow: hidden !important;
overflow: hidden !important;


background: #f8f9fa;
box-sizing: border-box !important;


box-sizing: border-box;
line-height: 0 !important;
font-size: 0 !important;
}
 
 
/* =========================================================
  MediaWikiによるラッパー対策
  ========================================================= */
 
.ts-infobox-slider__imagebox p,
.ts-infobox-slider__imagebox a,
.ts-infobox-slider__imagebox span {
margin: 0 !important;
padding: 0 !important;
}
}




/* =========================================================
/* =========================================================
   画像そのもの
   画像本体
  絶対にトリミングしない
   ========================================================= */
   ========================================================= */


.ts-gallery__imagebox img,
.ts-infobox-slider__imagebox img {
.ts-gallery__image {
display: block !important;
display: block !important;


2,144行目: 2,484行目:
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;
box-shadow: none !important;


/*
/*
* 切り取らず、枠内に画像全体を表示
* 元画像全体を表示する。
* cover は使用しない。
*/
*/
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;
}
}




/* =========================================================
/* =========================================================
   キャプション
   各画像の説明
   ========================================================= */
   ========================================================= */


.ts-gallery__caption {
.ts-infobox-slider__caption {
padding: 9px 11px 11px;
display: block !important;
 
width: 100% !important;
 
margin: 0 !important;
padding: 7px 8px 9px !important;


font-size: 12px;
background: #fff;
line-height: 1.55;


color: #202122;
color: #202122;


box-sizing: border-box;
font-size: 11px !important;
line-height: 1.5 !important;
 
text-align: left;
 
box-sizing: border-box !important;
 
overflow-wrap: anywhere;
}
}


.ts-gallery__source {
 
font-size: 11px;
.ts-infobox-slider__source {
line-height: 1.5;
color: #54595d;
color: #54595d;
font-size: 10px;
line-height: 1.45;
}
}


2,182行目: 2,546行目:
   ========================================================= */
   ========================================================= */


.ts-gallery__nav {
.ts-infobox-slider__nav {
position: absolute;
position: absolute !important;


/*
/*
* カード全体ではなく画像領域の中央付近
* 300pxの画像枠中央
*/
*/
top: 154px;
top: 150px !important;
 
z-index: 20 !important;
 
display: flex !important;
align-items: center !important;
justify-content: center !important;


z-index: 10;
width: 32px !important;
height: 32px !important;


width: 40px;
margin: 0 !important;
height: 40px;
padding: 0 !important;
padding: 0;


border: 1px solid #a2a9b1;
border: 1px solid rgba(84, 89, 93, 0.35) !important;
border-radius: 50%;
border-radius: 50% !important;


background: rgba(255, 255, 255, 0.93);
background: rgba(255, 255, 255, 0.88) !important;
color: #202122;
color: #54595d !important;


font-size: 28px;
font-family: Arial, sans-serif;
font-family: Arial, sans-serif;
line-height: 36px;
font-size: 22px !important;
text-align: center;
font-weight: normal;
line-height: 1 !important;
 
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);


cursor: pointer;
cursor: pointer;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);


transform: translateY(-50%);
transform: translateY(-50%);
}
}


.ts-gallery__prev {
 
left: 10px;
.ts-infobox-slider__prev {
left: 5px !important;
}
}


.ts-gallery__next {
 
right: 10px;
.ts-infobox-slider__next {
right: 5px !important;
}
}


.ts-gallery__nav:hover {
 
background: #fff;
.ts-infobox-slider__nav:hover {
border-color: #72777d;
background: #fff !important;
color: #202122 !important;
}
}


.ts-gallery__nav:disabled {
 
opacity: 0.3;
.ts-infobox-slider__nav:disabled {
opacity: 0.25 !important;
cursor: default;
cursor: default;
}
}


.ts-gallery:not(.ts-gallery--scrollable) .ts-gallery__nav {
 
display: none;
/* 1枚しかない場合はナビ不要 */
.ts-infobox-slider--single .ts-infobox-slider__nav {
display: none !important;
}
}


2,243行目: 2,619行目:
@media screen and (max-width: 720px) {
@media screen and (max-width: 720px) {


.ts-gallery {
.ts-infobox-slider__imagebox {
margin: 0.8em 0 1.2em;
height: 280px !important;
min-height: 280px !important;
max-height: 280px !important;
}
}


.ts-gallery__track {
.ts-infobox-slider__nav {
gap: 9px;
top: 140px !important;
 
/*
* 次のカードを少しだけ見せる
*/
padding: 3px 38px 10px 0;
}
}


.ts-gallery__item {
}
flex: 0 0 86vw !important;
width: 86vw !important;
max-width: 86vw !important;
}


/*
/* メインページ4カラムを内容量に合わせる */
* スマホも全画像同じ高さ
.ts-grid-4 {
*/
grid-auto-rows: auto !important;
.ts-gallery__imagebox {
height: auto !important;
height: 250px !important;
min-height: 0 !important;
min-height: 250px !important;
}
max-height: 250px !important;
}
 
.ts-gallery__caption {
padding: 8px 9px 10px;
font-size: 12px;
}
 
.ts-gallery__source {
font-size: 10.5px;
}


.ts-gallery__nav {
.ts-grid-4 > .ts-panel {
top: 129px;
height: auto !important;
 
min-height: 0 !important;
width: 34px;
height: 34px;
 
font-size: 24px;
line-height: 30px;
}
 
.ts-gallery__prev {
left: 5px;
}
 
.ts-gallery__next {
right: 5px;
}
}
}