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

[4.0] Correct css classes of mod_menu and the Cassiopeia template's css for menu at the "menu" module position #20702

Merged
merged 9 commits into from Jun 13, 2018
8 changes: 4 additions & 4 deletions modules/mod_menu/tmpl/default.php
Expand Up @@ -18,12 +18,12 @@
$id = ' id="' . $tagId . '"';
}

// The menu class is deprecated. Use nav instead
// The menu class is deprecated. Use mod-menu instead
?>
<ul<?php echo $id; ?> class="nav flex-column <?php echo $class_sfx; ?>">
<ul<?php echo $id; ?> class="mod-menu nav<?php echo $class_sfx; ?>">
<?php foreach ($list as $i => &$item)
{
$class = 'nav-item';
$class = 'mod-menu__item nav-item';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I would remove mod-menu__item. These items can be selected with simply mod-menu li


if ($item->id == $default_id)
{
Expand Down Expand Up @@ -86,7 +86,7 @@
// The next item is deeper.
if ($item->deeper)
{
echo '<ul class="list-unstyled small">';
echo '<ul class="mod-menu__list list-unstyled small">';
Copy link
Contributor

@ciar4n ciar4n Jun 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I would remove mod-menu__list. These items can be selected with simply mod-menu ul

}
// The next item is shallower.
elseif ($item->shallower)
Expand Down
23 changes: 13 additions & 10 deletions templates/cassiopeia/css/template.css
Expand Up @@ -59,7 +59,7 @@ html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: transparent; }
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

@-ms-viewport {
width: device-width; }
Expand Down Expand Up @@ -8761,6 +8761,9 @@ small,
dd {
margin-bottom: 0; }

.mod-menu.nav {
flex-direction: column; }

.j-main-container .alert {
margin: 10px; }

Expand Down Expand Up @@ -8990,23 +8993,23 @@ td .form-control {
color: #fff; }
.container-header .navbar-brand:hover, .container-header .navbar-brand:focus {
color: #efefef; }
.container-header .navbar-nav.flex-column {
.container-header .mod-menu.nav {
flex-direction: row !important; }
@media (max-width: 991.98px) {
.container-header .navbar-nav.flex-column {
.container-header .mod-menu.nav {
flex-direction: column !important;
margin-top: 20px; } }
.container-header .navbar-collapse {
flex-grow: 0; }
.container-header .navbar-nav li {
.container-header .nav li {
position: relative;
display: inline-block;
margin-right: 20px;
text-transform: uppercase;
letter-spacing: 1.75px; }
.container-header .navbar-nav li:last-child {
.container-header .nav li:last-child {
margin-right: 0; }
.container-header .navbar-nav li::after {
.container-header .nav li::after {
position: absolute;
right: 50%;
bottom: 0;
Expand All @@ -9019,13 +9022,13 @@ td .form-control {
opacity: .2;
transition: all .2s ease, background-color .2s ease; }
@media (max-width: 991.98px) {
.container-header .navbar-nav li::after {
.container-header .nav li::after {
display: none; } }
.container-header .navbar-nav li.active::after, .container-header .navbar-nav li:hover::after {
.container-header .nav li.active::after, .container-header .nav li:hover::after {
right: 2px;
left: 0;
background: #fff; }
.container-header .navbar-nav li a {
.container-header .nav li a {
position: relative;
display: block;
padding: .25rem 0 0;
Expand Down Expand Up @@ -9718,7 +9721,7 @@ joomla-alert {
box-shadow: -1px 0 0 rgba(0, 0, 0, 0.05); }
.nav.nav-tabs .nav-link.active {
background-color: rgba(0, 0, 0, 0.03);
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05) 100%);
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05) 100%);
border-right: 0;
border-left: 0;
border-top-left-radius: 0;
Expand Down
4 changes: 2 additions & 2 deletions templates/cassiopeia/css/template.min.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions templates/cassiopeia/scss/blocks/_global.scss
Expand Up @@ -33,3 +33,7 @@ small,
dd {
margin-bottom: 0;
}

.mod-menu.nav {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just .mod-menu should suffice. Currently adding .nav makes this useless if a class suffix is added.

flex-direction: column;
}
4 changes: 2 additions & 2 deletions templates/cassiopeia/scss/blocks/_header.scss
Expand Up @@ -53,7 +53,7 @@
}
}

.navbar-nav.flex-column {
.mod-menu.nav {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just .mod-menu should suffice. Currently adding .nav makes this useless if a class suffix is added.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but then it needs at line 70 below a change of .nav li to .mod-menu li, right?

flex-direction: row !important;

@include media-breakpoint-down(md) {
Expand All @@ -67,7 +67,7 @@
flex-grow: 0;
}

.navbar-nav li {
.nav li {
position: relative;
display: inline-block;
margin-right: 20px;
Expand Down