Skip to content

Commit 6a8dc54

Browse files
committed
Merge remote-tracking branch 'origin/AC-1014-v1' into spartans_pr_12122025
2 parents b290081 + 0d852e6 commit 6a8dc54

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,11 @@ define([
443443
listLabel = 'aria-labelledby="' + controlLabelId + '"';
444444
}
445445

446+
let checkIsRequiredAttrClass = 'required';
447+
446448
// Create new control
447449
container.append(
448-
'<div class="' + classes.attributeClass + ' ' + item.code + '" ' +
450+
'<div class="' + classes.attributeClass + ' ' + item.code + ' ' + checkIsRequiredAttrClass + '" ' +
449451
'data-attribute-code="' + item.code + '" ' +
450452
'data-attribute-id="' + item.id + '">' +
451453
label +

app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,19 @@
10761076
}
10771077
}
10781078

1079+
//
1080+
// For swatch required attribute
1081+
// _____________________________________________
1082+
.page-product-configurable #product_addtocart_form {
1083+
.swatch-attribute.required > .swatch-attribute-label:after,
1084+
.swatch-attribute.required > .label:after {
1085+
content: '*';
1086+
color: #e02b27;
1087+
margin-left: 5px;
1088+
font-weight: 600;
1089+
}
1090+
}
1091+
10791092
/**
10801093
* @codingStandardsIgnoreStart
10811094
*/

0 commit comments

Comments
 (0)