_Grid.scss 1.56 KB
Newer Older
1 2
@mixin grid() {
  .esri-grid {
杨思琦's avatar
杨思琦 committed
3 4
    // Uses shade of primary theme color for highlight
    $row-selected-color: rgba($button-color, 0.2);
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

    // Sets 'primary' color that other properties inherit from
    --lumo-base-color: #{$background-color};
    --lumo-primary-color: #{$button-color};
    --lumo-primary-text-color: var(--lumo-primary-color);
    --lumo-primary-color-10pct: #{$row-selected-color};

    // grid and checkbox background color(s) default and hover
    --lumo-contrast-20pct: #{$interactive-font-color};
    --lumo-contrast-30pct: #{$interactive-font-color--hover};

    // grid border color(s)
    --lumo-contrast-10pct: #{$background-color--hover};

    // row hover
    --lumo-row-background-hover: #{$background-color--hover};

杨思琦's avatar
杨思琦 committed
22 23 24
    width: 100%;
    height: 100%;

25
    .esri-grid__content {
杨思琦's avatar
杨思琦 committed
26
      background-color: inherit;
27 28 29 30 31 32
      width: 100%;
      height: 100%;
    }

    .esri-grid__grid {
      width: 100%;
杨思琦's avatar
杨思琦 committed
33
      height: 100%;
34 35 36 37 38 39 40 41 42 43 44

      a {
        color: $interactive-font-color;

        &:hover,
        &:focus {
          color: $interactive-font-color--hover;
        }
      }
    }

杨思琦's avatar
杨思琦 committed
45 46 47
    .esri-column__sorter,
    .esri-column__header-label {
      display: flex;
48
      flex-grow: 1;
杨思琦's avatar
杨思琦 committed
49
      align-items: center;
50
      margin: 0 5px;
杨思琦's avatar
杨思琦 committed
51
      min-height: 28px;
52 53 54 55 56 57 58
      overflow: auto;
    }

    .esri-column__menu-container {
      display: inline-block;
      margin: 0 5px;
    }
杨思琦's avatar
杨思琦 committed
59 60 61 62 63 64 65

    .esri-column__header-content {
      display: flex;
      flex-grow: 1;
      align-items: center;
      overflow: visible;
    }
66 67 68 69 70 71
  }
}

@if $include_Grid == true {
  @include grid();
}