userChrome.css・userContent.cssスレ Part12

■ このスレッドは過去ログ倉庫に格納されています
2022/04/21(木) 23:24:46.59ID:h1cG3tIy0
!extend:checked:vvvvv:1000:512
次スレを立てる方は↑を二行重ねて書いてください

●※前スレ
userChrome.css・userContent.cssスレ Part11
https://egg.5ch.net/test/read.cgi/software/1584753386/

●拡張機能
Stylish
https://addons.mozilla.org/ja/firefox/addon/stylish/
Stylus
https://addons.mozilla.org/ja/firefox/addon/styl-us/
User Style Manager (レガシーアドオン・要Classic Add-ons Archive)
https://addons.mozilla.org/ja/firefox/addon/user-style-manager/

●スクリプト
userChromeJS/UserCSSLoader at master ・ Griever/userChromeJS
https://github.com/Griever/userChromeJS/tree/master/UserCSSLoader
UserCSSManager (要userChromeES)
https://greasyfork.org/scripts/35880

●CSS(ユーザースタイルを記入するべきファイル)
userChrome.css(UI) / userContent.css(Web Site)

●関連サイト
Userstyles.org
https://userstyles.org/
CSS: カスケーディングスタイルシート | MDN
https://developer.mozilla.org/ja/docs/Web/CSS
とほほのスタイルシート入門
http://www.tohoho-web.com/css/
VIPQ2_EXTDAT: checked:vvvvv:1000:512:: EXT was configured
2023/10/26(木) 07:39:17.71ID:0BAp8JMp0
>>552
横からだけどありがとう。
同じくタブ上部のラインの色が効かなくてここに来ました。
無事解決した。
2023/10/26(木) 07:39:25.81ID:0BAp8JMp0
>>552
横からだけどありがとう。
同じくタブ上部のラインの色が効かなくてここに来ました。
無事解決した。
2023/10/26(木) 08:10:57.31ID:V+pbOwTC0
>>563
上の方ではメニューバーの色を指定してるんですが(rootでは指定していません)、この色が--menubar-bgcolorに反映されません
そもそも--menubar-bgcolorなんてものは無くて、適切な文字列があるのでしょうか?

/* メニューバーの背景色 */
#toolbar-menubar, menubar#main-menubar > menu {
background-color: #E3E4E6 !important;
}
/* タブバーの背景色 */
#tabbrowser-tabs {
background-color: var(--menubar-bgcolor) !important; /* 反映されない? */
}
2023/10/26(木) 08:56:11.14ID:V+pbOwTC0
あー、もしかして--toolbar-bgcolor変数なんてものもなくて
cssの上の方で--toolbar-bgcolorをユーザ定義してるってことですかね
でも--toolbar-bgcolorはユーザ定義してないですがちゃんと色入ってますね
2023/10/26(木) 12:16:41.38ID:kv1Lk2og0
>>567
--toolbar-bgcolorは:rootでブラウザが定義してる
スタイル当てたらそれらしい変数に勝手に割り当ててくれるなんて機能はない
値を使いまわしたいなら:rootでなくてもいいから共通の親で自分でcss変数定義すればいい
2023/10/26(木) 13:27:59.67ID:V+pbOwTC0
>>568
やっぱり--toolbar-bgcolorはブラウザ定義なんですね
そういうブラウザ定義のリストってどこかにありませんか?
2023/10/26(木) 13:46:30.08ID:ZvDnGjaS0
このへんじゃね?
chrome://browser/skin/browser-shared.css
2023/10/26(木) 14:28:50.61ID:h6pHxydk0
>>552
>>560
ありがとう
でもできなかったです

>>561
こちらでタブ上部ラインとタブの色をツールバーと同一化
できましたありがとう
2023/10/26(木) 15:49:39.80ID:V+pbOwTC0
>>570
ありがとうございます!
2023/10/27(金) 00:03:37.40ID:LduYCR+R0
ブックマークアイテムを右クリックするとコンテキストメニューが出るけど
選択したブックマークアイテムの背景色が選択されてない状態に戻ってしまいます

選択したブックマークアイテムの背景色を残したままコンテキストメニューを開いて選択できるような挙動にするには
どのようなcssになりますか?お願いします
2023/10/27(金) 18:08:13.21ID:r9Ml0IYI0
/* サイドバーの背景色 */
#historyTree,
#bookmarks-view treechildren,
#bookmarksPanel/* 検索ボックスの周囲の色 */ {
background-color: #3C444B!important;
border: solid 1px #3C444B !important;
}

/* クリック中選択状態のボーダーを消す */
treechildren::-moz-tree-row(current, focus) {
border: 1px dotted #F3D982 !important;
outline: none !important;
}

/* クリック中選択状態のアイテム */
#bookmarksPanel treechildren::-moz-tree-row(selected,current,focus) {
background-color: #6a788a !important;
border: solid 1px #495361 !important;
}
2023/10/27(金) 18:08:46.58ID:r9Ml0IYI0
/* 非アクティブ状態で選択状態のテキスト */
#bookmarksPanel treechildren::-moz-tree-cell-text(selected) {
color: #ffffff !important;
background-color: #6a788a !important;
}
/* 背景色 */
#bookmarksPanel treechildren::-moz-tree-row(selected) {
background-color: #6a788a !important;
border: solid 1px #495361 !important;
}

/* アクティブ状態で、選択状態のテキスト */
about:stylish-edit?id=15#bookmarksPanel treechildren::-moz-tree-cell-text(selected,focus) {
color: #ffffff !important;/*白抜き文字*/
background-color: #6a788a !important;
}
2023/10/27(金) 18:09:56.96ID:r9Ml0IYI0
/* セパレーター */
#bookmarksPanel treechildren::-moz-tree-separator {
border: 1px dotted #c7c7c7 !important;
margin-bottom: 1px !important;
margin-right: 10px !important;
}
2023/10/27(金) 19:59:41.11ID:0ytDqati0
サイドバー開いて、サイドバーのブックマーク欄の空白部分をクリックした時に出るこの水色の点線枠消したいのですが、
お教え下さい。
https://i.imgur.com/4vEL74M.png
2023/10/27(金) 20:27:12.12ID:LQ21L+jl0
>>574
こうですか?うまく緑になりませんがどこか違うんでしょうね…
#bookmarksMenu menupopup > menuitem treechildren::-moz-tree-row(selected)
{ background-color: green !important; }
2023/10/27(金) 22:40:40.30ID:Yu37zTfi0
ツイキャスの配信開始時に出るクリックしないと消えないダイアログ?を出ないようにする方法ありますか?
2023/10/29(日) 11:14:49.21ID:q6Jtw/pd0
>>577

/* 選択中の点線を消す */
:root {
--default-focusring-width : 0px !important;
}


上記消えない場合か不都合があれば↓で。

/* 選択中の点線を消す */
treechildren::-moz-tree-row(current, focus) {
border: 1px dotted #F3D982 !important; /* 周囲と同じ色を指定する */
outline: none !important;
}
2023/10/29(日) 14:06:26.62ID:WwYD5jxO0NIKU
>>580
ありがとうございます!
上のCSSで無事消せました!
感謝です。
2023/10/30(月) 00:19:05.47ID:hKMZydOnd
んー上のやってみたがタブの色戻らんなぁ
2023/10/30(月) 00:39:04.32ID:hKMZydOnd
ホバーのときはもとので出来るのに
2023/10/30(月) 01:15:04.63ID:hKMZydOnd
.tabbrowser-tab[selected] > .tab-stack > .tab-background{

できたわ
2023/10/30(月) 08:07:53.73ID:JtHnNYR10
描画速度としてはCSSセレクタは子セレクタ(>でつなげる)よりも、小孫セレクタ(スペースでつなげる)の方が速いらしいって聞いて
子セレクタで書いてたやつをほとんど小孫セレクタに書き換えたわ、体感的には分からんけど
ブラウザで取得できるCSSセレクタも小孫セレクタだしな
2023/10/30(月) 09:27:01.83ID:JtHnNYR10
タブが1つの時はタブバーを非表示にしたいんですが、以下ではうまくいきませんでした
どのようなセレクタが適切でしょうか?教えて頂ければ幸いです

tab:only-of-type:has(#TabsToolbar)
{
display: none !important;
}
2023/10/30(月) 10:45:47.94ID:r6GkuSgf0
>>586

#TabsToolbar:has(tab:only-of-type) {
display: none !important;
}
2023/10/30(月) 13:54:38.64ID:JtHnNYR10
>>587
ありがとうございます、でもhas使いこなせず結局うまくいかなかったので
以下を参考にしてタブバー隠せました
https://support.mozilla.org/en-US/questions/1394300

tab:only-of-type, tab:only-of-type + #tabbrowser-arrowscrollbox-periphery
{ display: none !important; }
589名無しさん@お腹いっぱい。 (ワッチョイ 29cf-n4SB)
垢版 |
2023/10/30(月) 20:37:26.66ID:RGZ6UolO0
つべの投稿が何日前とかじゃなく投稿日で見えるようにするやつ
前は後者だけだったのだがhoverするまでの位置が安定しなかった
背景はダーク用な
/* 次のの直前:最初からサイズ0なのだが次のの位置決定に悪さする対策 */
tp-yt-paper-tooltip.style-scope.ytd-watch-info-text
{left: 0px !important; top: 0px !important;}
/* 有効になったときに動くと鬱陶しいので元の位置も変えておく */
div#description div#tooltip.style-scope.tp-yt-paper-tooltip,
div#description div#tooltip.style-scope.tp-yt-paper-tooltip.hidden
{display:block !important; width:621px; height:13px;
position:absolute; top:-3px; left:-5px;
background:#282828; font-size:13px !important;}
2023/10/31(火) 00:32:26.75ID:iqpOrJ4W0HLWN
119、visuallyselected使えなくなってる?
591名無しさん@お腹いっぱい。 (ワッチョイ 094a-Q0z2)
垢版 |
2023/11/01(水) 15:34:22.06ID:KThtrPBO0
>>0588
横から Many thanks!
2023/11/01(水) 15:53:27.22ID:AjY8Q9D10
アドレスバーの候補表示設定を全てチェックを外すとポップアップで候補が表示されなくなりますが
URLをクリックすると青い枠が表示されます
目障りなので青い枠を表示させないようにするcssを教えてください

以下はだめでした
#urlbar:-moz-focusring {
outline: none !important;
}
2023/11/01(水) 16:26:18.91ID:8JmZmfoZ0
以下が効かなくなったのですが修正方法を教えてください
img:-moz-loading{visibility:hidden!important;}
2023/11/01(水) 20:23:59.23ID:AjY8Q9D10
ブラウザツールボックス内のコンテキストメニューの縦幅サイズが大きいのですが
ここはuserChrome.cssでのカスタムはムリでしょうか?
以下は効きませんでした
menuitem, menu
{ padding: 2px 5px 2px 5px !important; }
2023/11/01(水) 21:48:46.01ID:wAXBWz1U0
>>594
ブラウザツールボックス用のcssはchrome_debugger_profile\chromeの中に置く
2023/11/01(水) 22:01:33.38ID:AjY8Q9D10
>>595
できました!ありがとうございます
2023/11/02(木) 14:09:26.40ID:m2u+gzLF0
>>592のやつですが以下で青色が出ないようにはできました
ただ、枠外のボーダーかシャドウがまだ出てしまうので、それも出ないようにしたいです
(つまりURLバーをクリックしても見た目が変わらないようにしたい)
現状以下です、よろしくお願いします

/* アドレスバーにフォーカスしても見た目を変えない */
#urlbar {
--toolbar-field-focus-border-color: var(--toolbar-field-border-color) !important;
--toolbar-field-focus-background-color: var(--toolbar-field-background-color) !important;
box-shadow: 0px !important;
border: 0px !important;
}
598名無しさん@お腹いっぱい。 (ワッチョイ b1be-QCFe)
垢版 |
2023/11/02(木) 17:28:01.25ID:D5QlkTpH0
>>597
#urlbar-background {
outline: none !important;
box-shadow: none !important;
}
2023/11/02(木) 19:16:48.26ID:m2u+gzLF0
>>598
ありがとうございます!
2023/11/07(火) 21:42:22.00ID:c+tTtFER0
UIのポップアップメニューのマウスオーバー色は変えたいけど
コンテンツ内のプルダウンメニューのマウスオーバー色はデフォルトにしたいです
以下ではblueにはなりませんでしたが、デフォルトのマウスオーバー色にもなりませんでした
ご教示のほどお願いします

/* ポップアップメニューアイテムのマウスオーバー色 */
menuitem:hover {
background-color: blue !important;
}
/* コンテンツ内プルダウンメニューアイテムのマウスオーバー色 */
.ContentSelectDropdown-item-0:hover {
background-color: initial !important;
}
601名無しさん@お腹いっぱい。 (ワッチョイ 31be-Zzzn)
垢版 |
2023/11/08(水) 07:06:08.77ID:+nsDVE5s0
>>600
menupopup:not(#ContentSelectDropdownPopup) :is(menu, menuitem):not([disabled])[_moz-menuactive] {
background-color: blue !important;
}
2023/11/08(水) 10:11:01.21ID:oaEIXEKj0
>>601
menuitem:not(.ContentSelectDropdown-item-0):hover
で除外できました。ありがとうございます。
後方でinitial等で初期値を上書きできればと思ったんですが、うまくいかないものですね。
2023/11/09(木) 14:55:57.94ID:mKBsKUDr0
>>560
557じゃないけどありがとうございます
2023/11/09(木) 16:55:27.65ID:xJjECzt90
:where(.aaa, .bbb)
がなんとなく調子悪いので
:is(.aaa, .bbb)
を使ってる

:whereって複数選択できないのかな?
2023/11/09(木) 17:17:51.52ID:lYn3aIN50
:whereは詳細度上がらないから有無を言わさずルール上書きしたい場合に向かない
2023/11/09(木) 19:02:11.37ID:xJjECzt90
なるほど、やっぱり:isを使うべきか
2023/11/10(金) 15:40:27.75ID:voYkgPVmd
Chromeだったらアドオンでいくつかあるのだけど、Firefoxには見当たらないので、
YouTubeのコントロールバーをプレイヤーの下に表示するCSSを作りました。
標準プレイヤーのみの対応ですが、よければ使ってください。

/* 標準プレイヤーの高さをコントロールバーの分増やす */
ytd-watch-flexy:not([theater]) #player-container-inner {
height: 51px !important
}
/* プレイヤーバックの色変更 */
ytd-watch-flexy:not([theater]) #movie_player {
background-color: #000000 !important
}

なお、コントロールバーは一定時間経てば消えますが、
常時表示したい場合は、次のスクリプトをインストールしてください。

YouTube Permanent ProgressBar
https://greasyfork.org/ja/scripts/426283-youtube-permanent-progressbar

このCSS、シネマモードでも使えるようにしたいのですが、どうもうまく行きません。
もしいい方法があれば、助言お願いします。
2023/11/10(金) 20:24:32.44ID:f3pKcrn20
Firefoxのポップアップの背景色だけ有効にしたいでのですが
どのようにすれば良いですか

/* ポップアップ */
.menupopup-arrowscrollbox{
background-color: Pink !important;
}
2023/11/10(金) 21:03:58.18ID:WOCSS5Dk0
Pinkじゃなくてとりあえずredで試してみたら?
俺は以下で変えられてる

/* ポップアップメニューの背景色 */
.menupopup-arrowscrollbox {
background-color: #F2F2F2 !important;
}
2023/11/10(金) 23:08:12.50ID:f3pKcrn20
FirefoxのUI以外はどのように除外すればよいのでしょう?
一部のサイトで色が変わってしまいます
2023/11/11(土) 06:02:19.50ID:DRpcqQZc0
>>607

:root {
--controller-height: 51px;
}
#full-bleed-container {
margin-bottom: var(--controller-height) !important;
}
ytd-watch-flexy[theater] {
z-index: 0 !important;
}
ytd-watch-flexy[theater] .html5-video-player {
overflow: visible !important;
}
ytd-watch-flexy[theater] .ytp-chrome-bottom {
margin-bottom: calc(var(--controller-height) * -1) !important;
}
ytd-watch-flexy[theater] #player-container::after {
content: '';
position: absolute;
width: 100%;
height: var(--controller-height);
margin-bottom: calc(var(--controller-height) * -1);
background: #000;
z-index: -1;
}

--controller-heightでコントローラー位置を調節できる
2023/11/11(土) 08:01:50.19ID:DRpcqQZc0
>>611
横着したら普通の方のデザインが崩れてたので訂正
:root {
--controller-height: 51px;
}
ytd-watch-flexy[theater] #full-bleed-container {
margin-bottom: var(--controller-height) !important;
}
ytd-watch-flexy[theater] {
z-index: 0 !important;
}
ytd-watch-flexy[theater] .html5-video-player {
overflow: visible !important;
}
ytd-watch-flexy[theater] .ytp-chrome-bottom {
margin-bottom: calc(var(--controller-height) * -1) !important;
}
ytd-watch-flexy[theater] #player-container::after {
content: '';
position: absolute;
width: 100%;
height: var(--controller-height);
margin-bottom: calc(var(--controller-height) * -1);
background: #000;
z-index: -1;
}

ついでにツールチップの位置を下げるやつ

.ytp-tooltip {
margin-top: var(--controller-height) !important;
}
2023/11/11(土) 21:50:24.44ID:iFV/7D8Nd1111
>>612
うまく行きました。
本当にありがとうございます。
このCSSを見ると、自分のスキルではまだまだ無理だと実感しましたw

個人的に、コントロールバーを下にずらしたので、
バーを覆っていた影が気になるため、非表示にしました。

/* プレイヤー下部の影の非表示 */
ytd-watch-flexy .ytp-gradient-bottom {
display: none !important
}
2023/11/15(水) 00:03:48.32ID:6c0l3urr0
>>593
削除されてました
1850342 - Remove :-moz-loading, and avoid exposing :-moz-broken pseudo-class to content.
ttps://bugzilla.mozilla.org/show_bug.cgi?id=1850342
615名無しさん@お腹いっぱい。 (ワッチョイ 7f76-Zoup)
垢版 |
2023/11/16(木) 15:55:02.31ID:GAfZis5L0
ここにある
https://www.userchrome.org/firefox-89-styling-proton-ui.html
↓のように、アクティブタブの上部に青線、だけほしいので書式お願いします。

Container/Active Tab color line:
+Blue Line on active tab
2023/11/16(木) 16:39:40.94ID:dwMVWCtr0
/* タブの上部のライン */
.tab-background[multiselected],
.tab-background[selected] {
background: linear-gradient(to bottom, #0A84FF 2px, var(--toolbar-bgcolor) 0px) !important;
outline: none !important;
}
2023/11/16(木) 20:15:35.11ID:GAfZis5L0
>>615
ありがとうございます。試したのですが出来ないみたいですので
とりあえずは、そこのCSS based on above options:
での書式で行きます。
2023/11/16(木) 21:16:15.52ID:9vD6Cyf/0
/* アクティブタブの上に青い線 */
.tab-background:is([selected], [multiselected]) {
border-top: 1px solid Blue !important;
}
2023/11/16(木) 21:48:31.17ID:GAfZis5L0
>>618
ありがとうございます。出来ました。
2023/11/17(金) 19:08:03.92ID:OXKGruvy0
/* アクティブタブの文字色 */
label.tab-text.tab-label[selected="true"]{font-weight: bold !important;}

これが119で動かないんだけどどこを修正すれば動きますか?
2023/11/17(金) 19:33:17.61ID:xX6UYbsC0
="true"
を削除
2023/11/17(金) 20:32:00.21ID:UwG7SfoR0
/* アクティブタブの背景色 */
.tab-background:is([selected], [multiselected])

/* アクティブタブの文字色 */
.tabbrowser-tab:is([visuallyselected], [multiselected])

/* 非アクティブタブの背景色 */
.tab-background:not([selected], [multiselected])

/* 非アクティブタブの文字色 */
.tabbrowser-tab:not([visuallyselected], [multiselected])

/* アクティブにマウスオンしたときの背景色 */
.tabbrowser-tab:hover > .tab-stack > .tab-background:is([selected], [multiselected])

/* アクティブにマウスオンしたときの文字色 */
.tabbrowser-tab:hover > .tab-stack >:is([selected], [multiselected])

/* 非アクティブにマウスオンしたときの背景色 */
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected], [multiselected])

/* 非アクティブにマウスオンしたときの文字色 */
.tabbrowser-tab:hover > .tab-stack >:not([selected], [multiselected])
2023/11/18(土) 19:17:35.84ID:cgw9DvTW0
firefoxでstylus更新したらCSS効かなくなったんだけどなんで?
2023/11/18(土) 22:56:43.75ID:XB8apQtC0
>>623
バージョンは?
1.5.37 はバグありで取り下げられた
2023/11/20(月) 23:52:25.21ID:9MiWme6b0HAPPY
現バージョンでの音が出ているタブの色を変える方法が判明したら教えていただけますか
2023/11/21(火) 02:53:40.34ID:PceYQi9w0
>>625

.tabbrowser-tab:is([soundplaying], [muted]) .tab-background {
background-color: #f00 !important;
}
2023/11/21(火) 04:15:33.59ID:MY2f9Xb80
>>626
ほんと助かります、どうもありがとう
2023/11/21(火) 18:02:55.23ID:KzKE9Xic0
>>626
動くアイコンより見やすくていいね
2023/11/21(火) 19:20:04.63ID:YsTcpB/K0
俺はアイコンで音のオンオフするから全部乗せにてるわ
普通に見やすい

/* サウンドタブをアニメーション化 (赤) */
/* ミュートアイコンに色を付ける (黒) */
/* サウンドタブのファビコンを復活 */
/* サウンドタブの背景色+半透明化 */
2023/11/22(水) 16:28:41.22ID:5dG5VQLh0
Firefox 120で結構変更入ったっぽい?
まあESR使ってるからあんまり関係ないけど
2023/11/22(水) 16:45:50.24ID:DbYbpYZP0
アクティブタブ上部に線をつけたいです
■ このスレッドは過去ログ倉庫に格納されています
5ちゃんねるの広告が気に入らない場合は、こちらをクリックしてください。

ニューススポーツなんでも実況