1

I'm new to magento and couldn't find an answer for the following question: Is it posible to extend only a part/property of the parent .less file?

So when the original for example looks like:

    ...more 'less'
    .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
        .block-search {
            float: right;
            padding-left: 15px;
            position: relative;
            width: 250px;
            z-index: 4;

            .label {
                &:extend(.abs-visually-hidden-desktop all);
            }
}
     ...more 'less'

And I only want to change the float:right; to float:left; it doesn't seems to work to create the same file (and structure) in my own theme (that has this parent set) and in that less file only set:

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .block-search {
        float: left;
}
}
3

Try putting your code in theme_dir/web/css/source/_extend.less instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.