-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefix classes needed for JS functionality with 'js-' #743
base: 8.x-2.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add the js-
class name along with the existing. Just because people will be theming against the existing CSS classes. @bojanz thoughts?
@@ -238,5 +238,5 @@ function commerce_cart_views_data_alter(array &$data) { | |||
* Prepares variables for the cart block element template. | |||
*/ | |||
function template_preprocess_commerce_cart_block(&$variables) { | |||
$variables['attributes']['class'][] = 'cart--cart-block'; | |||
$variables['attributes']['class'][] = 'js-cart--cart-block'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also keep the non js-
variant? for theming
@@ -237,7 +237,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta | |||
['data' => $this->t('Settings'), 'colspan' => 2], | |||
], | |||
'#attributes' => [ | |||
'class' => ['checkout-pane-overview'], | |||
'class' => ['js-checkout-pane-overview'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment
@@ -106,7 +106,7 @@ protected function buildRedirectForm(array $form, FormStateInterface $form_state | |||
*/ | |||
public static function processRedirectForm(array $element, FormStateInterface $form_state, array &$complete_form) { | |||
$complete_form['#action'] = $element['#action']; | |||
$complete_form['#attributes']['class'][] = 'payment-redirect-form'; | |||
$complete_form['#attributes']['class'][] = 'js-payment-redirect-form'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous
https://www.drupal.org/node/2877358