跳转到内容

MediaWiki:Common.css:修订间差异

来自共创世界wiki
Hanchie​(留言 | 贡献)
无编辑摘要
Hanchie​(留言 | 贡献)
无编辑摘要
第1行: 第1行:
/* 页面内顶部栏(随页面滚动,不固定) */
.ccw-topbar {
.ccw-topbar {
   background: #252930;
   --ccw-bg: #252930;
   margin: 0 0 1em 0;
  --ccw-accent: #4c8dff;
  --ccw-accent-hover: #3b78e6;
  --ccw-field: #343a45;
  --ccw-h: 60px;
 
  background: var(--ccw-bg);
  border-radius: 10px;
   margin: 0 0 1em;
   font-size: 15px;
   font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
}
.ccw-topbar-inner {
.ccw-topbar-inner {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   gap: 20px;
   gap: 24px;
   min-height: 52px;
   height: var(--ccw-h);
   padding: 0 16px;
   padding: 0 20px;
}
}
.ccw-topbar a,
.ccw-topbar a,
.ccw-topbar a:visited { color: #fff; text-decoration: none; }
.ccw-topbar a:visited,
.ccw-topbar a.new { color: #fff; }
.ccw-topbar a.new { color: #e8eaed; text-decoration: none; }


/* Logo */
/* Logo */
.ccw-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; white-space: nowrap; }
.ccw-logo { display: flex; align-items: center; gap: 10px; flex: none; font-size: 20px; font-weight: 700; white-space: nowrap; }
.ccw-logo img { vertical-align: middle; }
.ccw-logo a { color: #fff !important; }
.ccw-logo img { display: block; }
 
/* 导航:悬停时底部出现高亮条 */
.ccw-nav { display: flex; align-items: stretch; align-self: stretch; flex: none; }
.ccw-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.ccw-nav a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--ccw-accent);
  transform: scaleX(0);
  transition: transform .18s;
}
.ccw-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.ccw-nav a:hover::after { transform: scaleX(1); }


/* 导航 */
/* 搜索区(InputBox) */
.ccw-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.ccw-search { flex: 1; max-width: 380px; margin-left: auto; }
.ccw-nav a { padding: 8px 14px; border-radius: 8px; white-space: nowrap; transition: background .15s; }
.ccw-search .mw-inputbox-centered { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; text-align: left !important; }
.ccw-nav a:hover { background: rgba(255,255,255,.12); }
.ccw-search form { position: relative; display: flex; align-items: center; margin: 0; }
.ccw-search .mw-inputbox-input { flex: 1; margin: 0; }
.ccw-search input.searchboxInput,
.ccw-search input[type=search],
.ccw-search input[type=text] {
  width: 100% !important;
  box-sizing: border-box;
  height: 38px;
  padding: 0 64px 0 18px;
  border: 1px solid transparent;
  border-radius: 19px;
  background: var(--ccw-field);
  color: #fff;
  font-size: 14px;
  outline: none;
  box-shadow: none;
  transition: border-color .15s, background .15s;
}
.ccw-search input.searchboxInput::placeholder { color: #8b919c; }
.ccw-search input.searchboxInput:focus {
  border-color: var(--ccw-accent);
  background: #2c313b;
}
/* 搜索按钮:叠在输入框右侧 */
.ccw-search input[type=submit],
.ccw-search button {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 15px;
  background: var(--ccw-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  cursor: pointer;
  box-shadow: none;
  transition: background .15s;
}
.ccw-search input[type=submit]:hover,
.ccw-search button:hover { background: var(--ccw-accent-hover); }
.ccw-search br { display: none; }


/* 右侧用户区 */
/* 右侧用户区 */
.ccw-user { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ccw-user { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.ccw-user a { padding: 6px 14px; border-radius: 18px; transition: background .15s; }
.ccw-user a { padding: 7px 16px; border-radius: 18px; transition: background .15s; }
.ccw-user a:hover { background: rgba(255,255,255,.12); }
.ccw-user a:first-child:hover { background: rgba(255,255,255,.1); }
.ccw-user a:last-child { background: #4c97ff; font-weight: 600; }
.ccw-user a:last-child { background: var(--ccw-accent); color: #fff !important; font-weight: 600; }
.ccw-user a:last-child:hover { background: #3373cc; }
.ccw-user a:last-child:hover { background: var(--ccw-accent-hover); }


/* 窄屏:隐藏导航 */
/* 响应式 */
@media (max-width: 700px) {
@media (max-width: 1000px) {
   .ccw-nav { display: none; }
   .ccw-nav { display: none; }
   .ccw-logo { flex: 1; }
}
@media (max-width: 640px) {
  .ccw-topbar-inner { gap: 12px; padding: 0 12px; }
   .ccw-logo { font-size: 17px; }
  .ccw-user a:first-child { display: none; }
}
}

2026年11月8日 (日) 21:28的版本

.ccw-topbar {
  --ccw-bg: #252930;
  --ccw-accent: #4c8dff;
  --ccw-accent-hover: #3b78e6;
  --ccw-field: #343a45;
  --ccw-h: 60px;

  background: var(--ccw-bg);
  border-radius: 10px;
  margin: 0 0 1em;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.ccw-topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--ccw-h);
  padding: 0 20px;
}
.ccw-topbar a,
.ccw-topbar a:visited,
.ccw-topbar a.new { color: #e8eaed; text-decoration: none; }

/* Logo */
.ccw-logo { display: flex; align-items: center; gap: 10px; flex: none; font-size: 20px; font-weight: 700; white-space: nowrap; }
.ccw-logo a { color: #fff !important; }
.ccw-logo img { display: block; }

/* 导航:悬停时底部出现高亮条 */
.ccw-nav { display: flex; align-items: stretch; align-self: stretch; flex: none; }
.ccw-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.ccw-nav a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--ccw-accent);
  transform: scaleX(0);
  transition: transform .18s;
}
.ccw-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.ccw-nav a:hover::after { transform: scaleX(1); }

/* 搜索区(InputBox) */
.ccw-search { flex: 1; max-width: 380px; margin-left: auto; }
.ccw-search .mw-inputbox-centered { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; text-align: left !important; }
.ccw-search form { position: relative; display: flex; align-items: center; margin: 0; }
.ccw-search .mw-inputbox-input { flex: 1; margin: 0; }
.ccw-search input.searchboxInput,
.ccw-search input[type=search],
.ccw-search input[type=text] {
  width: 100% !important;
  box-sizing: border-box;
  height: 38px;
  padding: 0 64px 0 18px;
  border: 1px solid transparent;
  border-radius: 19px;
  background: var(--ccw-field);
  color: #fff;
  font-size: 14px;
  outline: none;
  box-shadow: none;
  transition: border-color .15s, background .15s;
}
.ccw-search input.searchboxInput::placeholder { color: #8b919c; }
.ccw-search input.searchboxInput:focus {
  border-color: var(--ccw-accent);
  background: #2c313b;
}
/* 搜索按钮:叠在输入框右侧 */
.ccw-search input[type=submit],
.ccw-search button {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 15px;
  background: var(--ccw-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  cursor: pointer;
  box-shadow: none;
  transition: background .15s;
}
.ccw-search input[type=submit]:hover,
.ccw-search button:hover { background: var(--ccw-accent-hover); }
.ccw-search br { display: none; }

/* 右侧用户区 */
.ccw-user { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.ccw-user a { padding: 7px 16px; border-radius: 18px; transition: background .15s; }
.ccw-user a:first-child:hover { background: rgba(255,255,255,.1); }
.ccw-user a:last-child { background: var(--ccw-accent); color: #fff !important; font-weight: 600; }
.ccw-user a:last-child:hover { background: var(--ccw-accent-hover); }

/* 响应式 */
@media (max-width: 1000px) {
  .ccw-nav { display: none; }
}
@media (max-width: 640px) {
  .ccw-topbar-inner { gap: 12px; padding: 0 12px; }
  .ccw-logo { font-size: 17px; }
  .ccw-user a:first-child { display: none; }
}