modal static method

String modal({
  1. required ColorScheme colorScheme,
})

Build the CSS for modal dialog

Implementation

static String modal({required ColorScheme colorScheme}) {
  final borderColor = "${hexFromColor(color: colorScheme.outline)}AA";
  final modal = elementCss(
    selector: '.note-modal-content',
    properties: {
      'background': hexFromColor(color: colorScheme.surface),
      'border-color': borderColor,
      'box-shadow': "0 5px 10px ${hexFromColor(color: colorScheme.shadow)}50",
    },
  );
  final modalHeader = elementCss(
    selector: '.note-modal-header',
    properties: {
      'border': 'none',
      'border-bottom': "1px solid $borderColor",
    },
  );
  final modalfooter = elementCss(
    selector: '.note-modal-footer',
    properties: {
      'border': 'none',
      'border-top': "1px solid $borderColor",
    },
  );
  final foregroundColor = elementCss(
    selector: '.note-modal-content, .note-modal-title, .note-form-label',
    properties: {'color': hexFromColor(color: colorScheme.onSurface)},
  );

  return [modal, modalHeader, foregroundColor, modalfooter].join();
}