Magento 2 - нестандартный стиль _listings.less не работает - PullRequest
0 голосов
/ 05 октября 2018

Мы используем тему Порту.У нас есть наш список продуктов со стилем:

<div class="product details product-item-details"> code </div>

Мы проверили porto .less, который соответствует:

app \ design \ frontend \ Smartwave \ porto \ Magento_Catalog \ web\ css \ source \ module_listings.less

Где часть, где у нас есть стиль:

.products-list {
.product {
    &-item {
        display: table;
        width: 100%;
        padding: 10px 0;

        &-info {
            display: table-row;
            text-align: left;

            &:after {
                display: table;
                content: '';
                clear: both;
            }                
        }
        &-photo {
            width: 20%;
            display: block;
            float: left;
            margin-bottom: 20px;
        }
        &-details {
            display: block;
            width: 80%;
            padding: 0 0 20px 20px;
            float: left;

            .actions-primary {
                display: inline-block;
            }
            .actions-secondary {
                margin-left: 2px;
            }
        }
        &-name {
            font-size: 18px;
            line-height: 1;
            margin: 10px 0;
        }
        .product-reviews-summary {
            background: none;
        }
    }
}
.product-image-wrapper {
    &:extend(.abs-reset-image-wrapper all);
}

}

Я перезаписал файл:

app \ design \ frontend \ Smartwave \ porto_customTheme \ web \ css \ source \ module_listings.less

И вот часть, которую я хочу изменить:

& when (@media-common = true) {

  .products-list {
    .product {
      &-item {
        display: table;
        width: 100%;
        padding: 10px 0;
        &-details {
          display: block;
          width: 100%;
          padding: 0 0 20px 20px;
          float: left;
        }
      }
    }
  }
}

В основном у меня проблема в том, что продукты показывают шириной: 80% вместо ширины 100%:

80%: enter image description here

100%: enter image description here

Я запускаю эти команды:

rm -rf pub/static/*;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile;
php bin/magento setup:static-content:deploy ca_ES;
php bin/magento setup:static-content:deploy es_ES;
php bin/magento setup:static-content:deploy;

1 Ответ

0 голосов
/ 11 октября 2018

Поместите код из @media и попробуйте.

...