Commit 5c243ee3 authored by Ivica Puljic's avatar Ivica Puljic Committed by Ivica Puljic
Browse files

Issue #3099362 by pivica, sasanikolic: Update to Bootstrap 4.6.x

parent 1f73b373
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ a.tabledrag-handle {
}

tr.drag-previous {
  background: $state-warning-bg;
  background: theme-color-level('warning', $alert-bg-level);
}

// Drupal core responsive tables support.
+5 −6
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ $gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #868e96 !default;
$gray-600: #6c757d !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
@@ -61,7 +61,6 @@ $gray: map-get($colors, 'gray') !default; // @todo - map-get($colors, '
$gray-light:    map-get($theme-colors, 'gray-light') !default;
$gray-lighter:  $gray-200 !default;
$gray-lightest: $gray-100 !default;
$state-warning-bg:  lighten($yellow, 90%) !default; // @todo - leave it maybe? the proper code would be theme-color-level(map-get($theme-colors, -10)) but we do not have this function in bs_base level.

// Options
//
@@ -314,9 +313,9 @@ $navbar-toggler-bg-color: false !default;
$navbar-toggler-hover-color:        false !default;
$navbar-toggler-border-color:       $navbar-toggler-color !default;
$navbar-toggler-border-hover-color: false !default;
$navbar-toggler-icon-bg:            str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-toggler-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
$navbar-toggler-icon-bg:            url("data:image/svg+xml,<svg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'><path stroke='#{$navbar-toggler-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-toggler-close-icon-bg:      false !default;
$navbar-toggler-icon-bg-light:      str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$white}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
$navbar-toggler-icon-bg-light:      url("data:image/svg+xml,<svg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'><path stroke='#{$white}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-toggler-icon-hover-bg:      false !default;
// Horizontal second level vars.
$navbar-2nd-bg:                       $header-bg !default;
+14 −0
Original line number Diff line number Diff line
@@ -115,3 +115,17 @@ function bs_bootstrap_bs_update_8003($target_theme_name) {
    ]);
  }
}

/**
 * Bootstrap update to 4.6.0.
 */
function bs_bootstrap_bs_update_8004($target_theme_name) {
  $themes_info = _bs_base_drupal_theme_list_info();

  // Update Bootstrap version information in package.json.
  if (isset($themes_info[$target_theme_name])) {
    _bs_base_regexp_file($themes_info[$target_theme_name]->subpath . '/package.json', [
      '"bootstrap": ".*"' => '"bootstrap": "~4.6.0"',
    ]);
  }
}
+27 −16
Original line number Diff line number Diff line
@@ -472,7 +472,11 @@ function bs_bootstrap_preprocess_form_element(&$variables) {
  $variables['label']['#custom_forms'] = $variables['custom_forms'];

  // Custom forms checkbox and radio hidden title fix.
  if ($variables['custom_forms'] && isset($element['#type']) && ($element['#type'] === 'checkbox' || $element['#type'] === 'radio')) {
  if (isset($element['#type']) && ($element['#type'] === 'checkbox' || $element['#type'] === 'radio')) {
    if ($variables['custom_forms']) {
      $variables['attributes']['class'][] = 'custom-control';
      $variables['attributes']['class'][] = 'custom-' . $element['#type'];

      // In case when title is not displayed we will render empty span for title
      // so custom label before and after pseudo CSS rules can work properly.
      if ($element['#title_display'] === 'none') {
@@ -491,6 +495,13 @@ function bs_bootstrap_preprocess_form_element(&$variables) {
        $variables['label']['#title'] = '<span class="visually-hidden">' . $element['#title'] . '</span>';
      }
    }
    else {
      $variables['attributes']['class'][] = 'form-check';
    }
  }
  else {
    $variables['attributes']['class'][] = 'form-group';
  }

  // Enable floating labels for text-input-type elements.
  $floating_labels = bs_bootstrap_get_setting('floating_labels');
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
  "license": "GPL",
  "devDependencies": {
    "autoprefixer": "^10.2.6",
    "bootstrap": "~4.3.1",
    "bootstrap": "~4.6.0",
    "css-mqpacker": "^7.0.0",
    "deepmerge": "^4.2.2",
    "del": "^6.0.0",
Loading