github.com/thanos-io/thanos@v0.32.5/pkg/ui/react-app/src/themes/_shared.scss (about)

     1  /* THIS FILE WAS COPIED INTO THANOS FROM PROMETHEUS 
     2     (LIVING AT https://github.com/prometheus/prometheus/blob/main/web/ui/react-app/src/themes/_shared.scss),
     3     PROMETHEUS CODE WAS LICENSED UNDER AN APACHE 2.0 LICENSE, SEE
     4     https://github.com/prometheus/prometheus/blob/main/LICENSE.
     5  */
     6  
     7  /* This file contains styles shared by both light & dark themes.
     8     Style rules can be customised using SCSS variables set in dark.scss & light.sccs.
     9     How to add a rule that uses different values for each theme.
    10  
    11     1. Add a variable in light.scss & dark.scss files, it needs to be set before
    12        "@import ./shared" statement.
    13        Example:
    14  
    15        $foo = '#000';
    16   
    17     2. Add a style rule in _shared.scss (this file) that uses new variable.
    18        Example:
    19  
    20        .my-class { background-color: $foo; }
    21  
    22     Instead of setting custom variables you can re-use any of bootstrap SCSS variables
    23     as they are all imported and ready.
    24     Resources:
    25     - https://getbootstrap.com/docs/4.6/getting-started/theming/
    26     - https://github.com/twbs/bootstrap/blob/v4.6.0/scss/_variables.scss
    27    */
    28  
    29    .alert-cell {
    30      color: $alert-cell-color;
    31      background: $rule-cell-bg;
    32    }
    33    
    34    .rule-cell {
    35      background-color: $rule-cell-bg;
    36    }
    37    
    38    .config-yaml {
    39      display: block;
    40      padding: 10px;
    41      font-size: 13px;
    42      color: $config-yaml-color;
    43      word-break: break-all;
    44      background-color: $config-yaml-bg;
    45      border: 1px solid $config-yaml-border;
    46      border-radius: 4px;
    47    }
    48    
    49    .query-stats {
    50      flex-grow: 1;
    51      font-size: 0.7rem;
    52      color: $query-stats-color;
    53    }
    54    
    55    .metrics-explorer.modal-dialog {
    56      max-width: 750px;
    57      overflow-wrap: break-word;
    58    }
    59    .metrics-explorer .metric {
    60      cursor: pointer;
    61      margin: 0;
    62      padding: 5px;
    63    }
    64    .metrics-explorer .metric:hover {
    65      background: $metrics-explorer-bg;
    66    }
    67    button.metrics-explorer-btn {
    68      color: $input-group-addon-color;
    69      background-color: $input-group-addon-bg;
    70      border: $input-border-width solid $input-group-addon-border-color;
    71    }
    72    
    73    .graph-controls button.clear-time-btn,
    74    .table-controls button.clear-time-btn {
    75      background-color: $input-bg;
    76      border: $input-border-width solid $input-border-color;
    77      border-left: none;
    78    
    79      &:hover {
    80        color: darken($secondary, 10%);
    81      }
    82    }
    83    
    84    button.execute-btn {
    85      width: 84px;
    86      border: $input-border-width solid darken($primary, 5%);
    87    }
    88    
    89    .expression-input .cm-expression-input {
    90      border: $input-border-width solid $input-border-color;
    91      flex: 1 1 auto;
    92      padding: 4px 0 0 8px;
    93      font-size: 15px;
    94    }
    95    
    96    .tab-content {
    97      border-left: 1px solid $nav-tabs-border-color;
    98      border-right: 1px solid $nav-tabs-border-color;
    99      border-bottom: 1px solid $nav-tabs-border-color;
   100      padding: 10px;
   101    }
   102    
   103    /* bootstrap-dark seems to break overflow on modals, making them unscrollable
   104       this fixes it by allowing overflow and enabling scrolling */
   105    .modal.show {
   106      overflow-y: auto;
   107    }
   108    
   109    .panel {
   110      margin-bottom: 20px;
   111    }
   112  
   113    input[type='checkbox']:checked + label {
   114      color: #286090;
   115    }
   116  
   117    .custom-control-label {
   118      cursor: pointer;
   119    }
   120  
   121    .togglers-wrapper .form-group {
   122      margin-bottom: 0.5rem;
   123    }
   124  
   125    [for$='-toggler'].custom-control-label::before,
   126    [for$='-toggler'].custom-control-label::after {
   127      top: 0.28rem;
   128      left: -1.3rem;
   129      width: 1.12rem;
   130      height: 1.12rem;
   131    }
   132  
   133    .capitalize-title::first-letter {
   134      text-transform: capitalize;
   135    }
   136  
   137    /* Using a more specific selector here to be able to override Bootstrap's default input group styles. */
   138    .input-group.expression-input {
   139      margin-bottom: 10px;
   140      /* Prevent the input group from wrapping around when the editor content is too long for a line. */
   141      flex-wrap: nowrap;
   142    }
   143  
   144    .alert.alert-danger {
   145      margin-bottom: 10px;
   146    }
   147  
   148    .nav-tabs .nav-link {
   149      cursor: pointer;
   150    }
   151  
   152    .tab-content .alert {
   153      margin-bottom: 0;
   154    }
   155  
   156    .data-table.table {
   157      margin: 10px 0 2px 0;
   158    }
   159  
   160    .data-table > tbody > tr > td {
   161      padding: 5px 0 5px 8px;
   162      font-size: 0.8em;
   163      overflow: hidden;
   164    }
   165  
   166    .autosuggest-dropdown {
   167      position: absolute;
   168      border: 1px solid #ced4da;
   169      background-color: #fff;
   170      color: #495057;
   171      font-size: 1rem;
   172      z-index: 1000;
   173      left: 56px;
   174      margin-top: -6px;
   175    }
   176  
   177    .autosuggest-dropdown-list {
   178      padding: 0;
   179      margin: 0;
   180      list-style: none;
   181    }
   182  
   183    .autosuggest-dropdown-list li {
   184      width: 100%;
   185      padding: 0.25rem 1.5rem;
   186      clear: both;
   187      white-space: nowrap;
   188      background-color: transparent;
   189      border: 0;
   190      display: block;
   191    }
   192  
   193    .autosuggest-dropdown-list li.autosuggest-dropdown-header {
   194      background-color: #bfdeff;
   195      font-size: 10px;
   196      line-height: 1.5;
   197      text-transform: uppercase;
   198      text-align: center;
   199    }
   200  
   201    .graph-controls,
   202    .table-controls {
   203      margin-bottom: 10px;
   204    }
   205  
   206    .graph-controls input,
   207    .table-controls input {
   208      text-align: center;
   209    }
   210  
   211    .graph-controls .range-input input {
   212      width: 50px;
   213    }
   214  
   215    .time-input input {
   216      border-right: none;
   217    }
   218  
   219    .time-input {
   220      width: 270px !important;
   221    }
   222  
   223    .graph-controls input.resolution-input {
   224      width: 90px;
   225    }
   226  
   227    .graph-controls > :not(:first-child) {
   228      margin-left: 20px;
   229    }
   230  
   231    .graph-legend {
   232      margin: 15px 0 15px 55px;
   233      font-size: 0.75em;
   234      padding: 10px 5px;
   235      display: inline-block;
   236    }
   237  
   238    .legend-item {
   239      cursor: pointer;
   240      display: flex;
   241      padding: 0 5px;
   242      border-radius: 3px;
   243      line-height: 1.7;
   244    }
   245  
   246    .legend-item div {
   247      flex-wrap: wrap;
   248    }
   249  
   250    .legend-swatch {
   251      min-width: 7px;
   252      height: 7px;
   253      outline-offset: 1px;
   254      outline: 1.5px solid #ccc;
   255      margin: 6px 8px 2px 0;
   256      display: inline-block;
   257    }
   258  
   259    .legend-item:hover {
   260      background: rgba(0, 0, 0, 0.18);
   261    }
   262  
   263    .legend-metric-name {
   264      margin-right: 1px;
   265    }
   266  
   267    .legend-label-name {
   268      font-weight: bold;
   269    }
   270  
   271    .graph {
   272      margin: 0 5px 0 5px;
   273    }
   274  
   275    .graph-chart {
   276      height: 500px;
   277      width: 100%;
   278      /* This is picked up by Flot's axis label font renderer,
   279          which ignores "color" and uses "fill" instead. */
   280      fill: #495057;
   281      font-size: 0.8em;
   282    }
   283  
   284    .graph-chart .flot-overlay {
   285      cursor: crosshair;
   286    }
   287  
   288    .graph-tooltip {
   289      background: rgba(0, 0, 0, 0.8);
   290      color: #fff;
   291      font-family: Arial, Helvetica, sans-serif;
   292      font-size: 12px;
   293      white-space: nowrap;
   294      padding: 8px;
   295      border-radius: 3px;
   296    }
   297  
   298    .graph-tooltip .labels {
   299      font-size: 11px;
   300      line-height: 11px;
   301    }
   302  
   303    .graph-tooltip .detail-swatch {
   304      display: inline-block;
   305      width: 10px;
   306      height: 10px;
   307    }
   308  
   309    .add-panel-btn {
   310      margin-bottom: 20px;
   311    }
   312  
   313    .target-head {
   314      font-weight: 700;
   315      font-size: large;
   316    }
   317  
   318    .group-info {
   319      display: flex;
   320      justify-content: space-between;
   321      margin-bottom: 10px;
   322      padding: 10px;
   323    }
   324  
   325    .badges-wrapper > span {
   326      margin-right: 5px;
   327      max-height: 20px;
   328    }
   329  
   330    .rules-head {
   331      font-weight: 600;
   332    }
   333  
   334    .rule_cell {
   335      white-space: pre-wrap;
   336      background-color: #f5f5f5;
   337      display: block;
   338      font-family: monospace;
   339    }