Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【システム】クラス名が組込側と重複することがある #1822

Closed
hiraokakoichi opened this issue May 12, 2022 · 5 comments
Closed
Assignees
Labels
Bug バグ
Milestone

Comments

@hiraokakoichi
Copy link
Contributor

概要

クラス名が組込側と重複することがあるので、システム側のクラスにはbcをつける

ユーザーズフォーラムにて指摘あり

@GUSSAN-BEEDAN
Copy link

GUSSAN-BEEDAN commented May 13, 2022

まず今回の様なfontawsomeやその他の汎用的なモジュールを管理側利用の目的でフロントエンド側に読み込ませるケースでは、テーマ側でも汎用的に利用される可能性も考慮して、CSSにおいてはクラス名の命名規則に準拠するような配慮は、やはり必要ではないかと思います。

また、今回のケースに限定すれば、fontawsomeは、そもそもToolbarエリアでの利用しか考えていないわけなので、

@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  font-display: auto;
  src: url("../../fonts/admin/fa-solid-900.eot");
  src: url("../../fonts/admin/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../../fonts/admin/fa-solid-900.woff2") format("woff2"), url("../../fonts/admin/fa-solid-900.woff") format("woff"), url("../../fonts/admin/fa-solid-900.ttf") format("truetype"), url("../../fonts/admin/fa-solid-900.svg#fontawesome") format("svg"); }

#ToolBar .fa, #ToolBar .bca-toolbar__tools-button-publish a::before, #ToolBar .bca-toolbar__tools-button-edit a::before, #ToolBar .bca-toolbar__tools-button-add a::before,
#ToolBar .fas {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900; }

などとするなどの配慮があれば問題ないかと。
また、ほんの数個のアイコン表示の目的で、ほとんど利用していないクラス名を少し乱暴にてんこもりに放り込んでしまっている点が、問題かと。
実際、利用されているクラスは、別途、以下の様な記述がCSS(theme/admin-third/css/admin/toolbar.css)後半にありますし。。。

  .bca-toolbar__tools-button-publish a::before {
    content: "\f06e"; }
  .bca-toolbar__tools-button-edit a::before {
    content: "\f303"; }
  .bca-toolbar__tools-button-add a::before {
    content: "\f055"; }

.bca-toolbar__tools-button-publish a::before {
  font-weight: 400; }

@kaburk kaburk added the Bug バグ label May 16, 2022
@ryuring
Copy link
Collaborator

ryuring commented Jun 1, 2022

@GUSSAN-BEEDAN @hiraokakoichi こちらフォーラムのログなども改めて確認したのですが、Toolbarには、既に、bca- というプレフィックスを与えていますので、「クラス名が組込側と重複することがある」というわけではなく、下記の行にて、@import 'theme/var/icons'; を記述してしまったという事が問題ですよね。

5f8c960#diff-acbf186c006b15a7a59df3d819a8f7ee5c7f45aa8c5065ca49e6838b203fab4fR3

なので、@import 'theme/var/icons'; を除外して、 @GUSSAN-BEEDAN がおっしゃるような対応を行おうかと思います。

@ryuring ryuring self-assigned this Jun 1, 2022
@ryuring ryuring added this to the 4.6.1 milestone Jun 1, 2022
@GUSSAN-BEEDAN
Copy link

@ryuring
お手数ですが、ご対応よろしくお願いします。

@GUSSAN-BEEDAN
Copy link

@ryuring
添付のとおり、4.6.1-devにて不具合が解消されていることを確認しました。
スクリーンショット 2022-06-12 18 30 08

@ryuring
Copy link
Collaborator

ryuring commented Jun 12, 2022

@GUSSAN-BEEDAN 確認ありがとうございます〜

ryuring pushed a commit that referenced this issue Apr 17, 2023
Co-authored-by: Đỗ Văn Hùng <HungDV2022>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug バグ
Projects
None yet
Development

No branches or pull requests

4 participants