Skip to content

Commit 4456b32

Browse files
authored
[FBE] Split FBE css so that we don't load all of it on every page throughout Magento (#529)
1 parent a60fa25 commit 4456b32

File tree

5 files changed

+32
-19
lines changed

5 files changed

+32
-19
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
33
<head>
4-
<css src="Meta_BusinessExtension::css/fbe.css"/>
4+
<css src="Meta_BusinessExtension::css/meta_sidebar_icon.css"/>
55
</head>
66
</page>

app/code/Meta/BusinessExtension/view/adminhtml/layout/fbeadmin_setup_index.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0"?>
22
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
3+
<head>
4+
<css src="Meta_BusinessExtension::css/commerce_extension.css"/>
5+
</head>
6+
37
<body>
48
<referenceBlock remove="true" name="header.inner.left" />
59
<referenceBlock remove="true" name="header.inner.right" />

app/code/Meta/BusinessExtension/view/adminhtml/web/css/fbe.css renamed to app/code/Meta/BusinessExtension/view/adminhtml/web/css/commerce_extension.css

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,4 @@
3838
border-radius: 4px;
3939
max-width: 800px;
4040
padding: 16px;
41-
}
42-
43-
/* Add a grayscale Meta logo to the left sidebar item for this extension. */
44-
.admin__menu .level-0.item-facebook > a {
45-
padding-top: 4px;
46-
}
47-
.admin__menu .level-0.item-facebook > a:before {
48-
content: url('../images/meta.svg');
49-
filter: contrast(0) grayscale(1) brightness(1.50);
50-
height: 28px;
51-
margin: 0 auto;
52-
width: 38px;
53-
}
54-
.admin__menu .level-0.item-facebook:hover > a:before,
55-
.admin__menu .level-0.item-facebook._active > a:before {
56-
filter: contrast(0) grayscale(1) brightness(2) ;
57-
}
41+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the code directory.
8+
*/
9+
10+
/* Add a grayscale Meta logo to the left sidebar item for this extension. */
11+
.admin__menu .level-0.item-facebook > a {
12+
padding-top: 4px;
13+
}
14+
15+
.admin__menu .level-0.item-facebook > a:before {
16+
content: url('../images/meta.svg');
17+
filter: contrast(0) grayscale(1) brightness(1.50);
18+
height: 28px;
19+
margin: 0 auto;
20+
width: 38px;
21+
}
22+
23+
.admin__menu .level-0.item-facebook:hover > a:before,
24+
.admin__menu .level-0.item-facebook._active > a:before {
25+
filter: contrast(0) grayscale(1) brightness(2);
26+
}

app/code/Meta/Catalog/view/adminhtml/layout/fbeadmin_diagnostic_index.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<title>
66
Catalog Diagnostics
77
</title>
8-
<css src="Meta_BusinessExtension::css/fbe.css"/>
98
<link src="Meta_Catalog::js/diagnostics.js"/>
109
</head>
1110
<body>

0 commit comments

Comments
 (0)