File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
code/Magento/Swatches/view/base/web/js
design/frontend/Magento/luma/Magento_Catalog/web/css/source Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff 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 +
Original file line number Diff line number Diff line change 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 */
You can’t perform that action at this time.
0 commit comments