Skip to content

Commit

Permalink
#1313 「コンテンツにあわせる」パンくずは .u-slim-width 内に、.c-entry > * に max-width を適用
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Feb 16, 2023
1 parent 949e820 commit 2a02f8c
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 50 deletions.
16 changes: 8 additions & 8 deletions src/css/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
@import 'object/utility/utility';

#page-start {
margin-bottom: -1px;
height: 1px;
width: 1px;
visibility: hidden;
margin-bottom: -1px;
height: 1px;
width: 1px;
visibility: hidden;
}

#page-end {
margin-top: -1px;
height: 1px;
width: 1px;
visibility: hidden;
margin-top: -1px;
height: 1px;
width: 1px;
visibility: hidden;
}
32 changes: 16 additions & 16 deletions src/css/app/core/mixin/_cover-img.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
@mixin cover-img {
position: relative;
overflow: hidden;
position: relative;
overflow: hidden;

> picture {
> picture {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
}

> img,
> picture > img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
object-fit: cover;
object-position: 50% 50%;
}
> img,
> picture > img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
object-fit: cover;
object-position: 50% 50%;
}
}
4 changes: 2 additions & 2 deletions src/css/app/foundation/_foundation.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:root {
// @see src/css/admin/app
--_global--background-color: #fff;
// @see src/css/admin/app
--_global--background-color: #fff;
}

@import '../../../../vendor/inc2734/wp-basis/src/assets/packages/sass-basis/src/css/foundation/base';
Expand Down
2 changes: 1 addition & 1 deletion src/css/app/foundation/_wordpress/_align/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
margin-left: 0;
}

.alignright.alignright.alignright {
.alignright.alignright.alignright {
float: right;
margin-top: 0;
margin-right: 0;
Expand Down
8 changes: 7 additions & 1 deletion src/css/app/layout/_body/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@

// One column slim / Blank slim
[data-has-sidebar="false"][data-is-slim-width="true"] {
--wp--custom--content-max-width: var(--wp--custom--slim-width);
// --wp--custom--content-max-width: var(--wp--custom--slim-width);
--wp--style--global--content-size: var(--wp--custom--slim-width);

.#{ $_prefix }c-entry > :not(.#{ $_prefix }c-entry__body) {
margin-inline: auto;
max-width: var(--wp--custom--slim-width);
}
}

// One column
Expand Down
8 changes: 4 additions & 4 deletions src/css/app/layout/_header/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@
* simple header
*/
.#{ $_prefix }l-simple-header {
&__row {
@include _media-min(lg) {
&__row {
@include _media-min(lg) {
padding-top: var(--_padding-1);
padding-bottom: var(--_padding-1);
}
}
}
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/css/app/object/component/_google-adsense/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
text-align: center;
}

.#{ $_prefix }l-contents__sidebar .#{ $_prefix }c-google-adsense {
.#{ $_prefix }l-contents__sidebar .#{ $_prefix }c-google-adsense {
margin-bottom: var(--_margin1);

&:last-child {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
}

.children .cat-item .children:last-child:not(:first-child) {
margin-bottom: calc(-1 * var(--_padding-2));
margin-bottom: calc(-1 * var(--_padding-2));
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.tag-cloud-link {
--_border-radius: var(--_global--border-radius);
--_border-radius: var(--_global--border-radius);

display: inline-block;
background-color: var(--wp--preset--color--sm-lightest-gray);
Expand Down
2 changes: 1 addition & 1 deletion src/css/dependency/woocommerce/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
.#{ $_prefix }l-container .#{ $_prefix }l-contents #respond #submit,
.#{ $_prefix }l-container .#{ $_prefix }l-contents .button,
.wc-block-grid .wp-block-button .wp-block-button__link {
--_border-radius: var(--_global--border-radius);
--_border-radius: var(--_global--border-radius);

@include _transition(all);
border-radius: var(--_border-radius);
Expand Down
2 changes: 1 addition & 1 deletion src/css/wpac/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Alert
*/
.wpac-alert {
--_border-radius: var(--_global--border-radius);
--_border-radius: var(--_global--border-radius);

$color: #fff9e6;
@include _alert();
Expand Down
26 changes: 13 additions & 13 deletions templates/layout/wrapper/one-column-slim.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package snow-monkey
* @author inc2734
* @license GPL-2.0+
* @version 19.1.3
* @version 19.1.5
*/

use Framework\Helper;
Expand Down Expand Up @@ -80,11 +80,11 @@
}
?>

<?php
if ( ! is_front_page() && 'content-width' === get_theme_mod( 'breadcrumbs-position' ) ) {
Helper::get_template_part( 'template-parts/common/breadcrumbs' );
}
?>
<?php if ( ! is_front_page() && 'content-width' === get_theme_mod( 'breadcrumbs-position' ) ) : ?>
<div class="u-slim-width">
<?php Helper::get_template_part( 'template-parts/common/breadcrumbs' ); ?>
</div>
<?php endif; ?>

<?php do_action( 'snow_monkey_before_contents_inner' ); ?>

Expand All @@ -104,18 +104,18 @@

<?php do_action( 'snow_monkey_after_contents_inner' ); ?>

<?php if ( ! is_front_page() && 'bottom-content-width' === get_theme_mod( 'breadcrumbs-position' ) ) :?>
<div class="u-slim-width">
<?php Helper::get_template_part( 'template-parts/common/breadcrumbs' ); ?>
</div>
<?php endif; ?>

<?php
if ( ! is_front_page() && 'bottom-content-width' === get_theme_mod( 'breadcrumbs-position' ) ) {
if ( ! is_front_page() && 'bottom' === get_theme_mod( 'breadcrumbs-position' ) ) {
Helper::get_template_part( 'template-parts/common/breadcrumbs' );
}
?>
</div>

<?php
if ( ! is_front_page() && 'bottom' === get_theme_mod( 'breadcrumbs-position' ) ) {
Helper::get_template_part( 'template-parts/common/breadcrumbs' );
}
?>
</div>

<?php do_action( 'snow_monkey_append_contents' ); ?>
Expand Down

0 comments on commit 2a02f8c

Please sign in to comment.