← Files Daybreak Defense FactoryARCHIVED FILE

.internal/defense-factory-ui/src/workbench/patch-diff.css

6.46 KB · Nov 12, 2026 · 06:08 UTC

↓ Download file

See the change to this file →

@import "./assets/fragment-mono-license.css";

@font-face {
  font-family: "Fragment Mono";
  src: url("@defense-factory/fonts/FragmentMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

.df-patch-browser,
.df-compact-patch {
  --df-patch-mono: "Fragment Mono", var(--font-mono);
  --df-patch-border: var(--color-border-strong);
  /* Keep small diff counts legible on tinted lines and hovered file rows. */
  --df-patch-add: light-dark(var(--color-text-success), var(--green-300));
  --df-patch-remove: light-dark(var(--color-text-danger), var(--red-200));
}

.df-patch-browser {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--df-patch-border);
  border-radius: 12px;
  background: var(--color-surface);
}

.df-compact-patch {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--font-text-xs-size);
  line-height: var(--font-text-sm-line-height);
}

.df-compact-patch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: var(--color-text-secondary);
}

.df-compact-patch-path {
  min-width: 0;
  overflow-wrap: anywhere;
}

.df-compact-patch-header .df-patch-counts,
.df-compact-patch-kind {
  margin-inline-start: auto;
}

.df-compact-patch-files {
  margin: 0;
  padding: 3px 0;
  border-block-start: 1px solid var(--color-border);
  list-style: none;
}

.df-compact-patch-files li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 12px;
}

.df-compact-patch-files .df-patch-counts {
  border: 0;
  padding: 0;
}

.df-compact-patch-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 1px 12px;
  font-family: var(--df-patch-mono);
}

.df-compact-patch-line[data-change="addition"] {
  background: var(--color-background-success-soft-alpha);
  color: var(--df-patch-add);
}

.df-compact-patch-line[data-change="deletion"] {
  background: var(--color-background-danger-soft-alpha);
  color: var(--df-patch-remove);
}

.df-compact-patch-line code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
  white-space: pre;
}

.df-patch-toolbar,
.df-patch-title,
.df-patch-tools,
.df-patch-counts,
.df-patch-file-row,
.df-patch-path {
  display: flex;
  align-items: center;
}

.df-patch-toolbar {
  min-height: 52px;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
  padding: 4px 16px 4px 12px;
  border-bottom: 1px solid var(--df-patch-border);
}

.df-patch-title,
.df-patch-file-row,
.df-patch-counts {
  gap: 4px;
}

.df-patch-title h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.df-patch-tools {
  gap: 8px;
}

.df-patch-toolbar button {
  --button-size: 28px;
  --button-icon-size: 16px;
  --button-radius: 10px;
  color: var(--color-text-secondary);
}

.df-patch-toolbar button[aria-pressed="true"] {
  background: var(--color-background-secondary-soft);
}

/* ODS-318 regular 16px exports, pending availability in @oai/icons. */
.df-patch-context-icon {
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("./assets/arrow-up-line-horizontal-arrow-down.svg") center no-repeat;
}

[aria-expanded="true"] .df-patch-context-icon {
  mask-image: url("./assets/arrow-down-line-horizontal-arrow-up.svg");
}

.df-patch-file-icon {
  flex: none;
  background: currentColor;
  width: 15px;
  height: 15px;
  color: var(--color-text-secondary);
  mask: url("./assets/diff-file.svg") center no-repeat;
}

.df-patch-counts {
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 1px 4px;
  font: 400 11px/16px var(--df-patch-mono);
  white-space: nowrap;
}

.df-patch-total {
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--color-text-secondary);
  font: 400 12px/20px var(--font-sans);
}

.df-patch-added {
  color: var(--df-patch-add);
}
.df-patch-removed {
  color: var(--df-patch-remove);
}

.df-patch-body {
  display: flex;
  height: 440px;
  min-width: 0;
}

.df-patch-files {
  flex: 0 0 224px;
  min-width: 0;
  overflow: auto;
  border-inline-end: 1px solid var(--df-patch-border);
  padding: 8px;
}

.df-patch-file {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 55px;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 7px;
  text-align: start;
  cursor: pointer;
}

.df-patch-file:is(:hover, [aria-pressed="true"]) {
  background: light-dark(#f6f6f6, var(--color-background-secondary-soft-hover));
}

.df-patch-file:focus-visible {
  outline: 2px solid var(--color-text-info);
  outline-offset: -2px;
}

.df-patch-file-label,
.df-patch-selected {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.df-patch-file-row {
  justify-content: space-between;
  min-height: 20px;
}

.df-patch-filename,
.df-patch-directory,
.df-patch-path > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.df-patch-filename {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.df-patch-directory {
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 16px;
}

.df-patch-path {
  flex-shrink: 0;
  height: 40px;
  gap: 8px;
  margin: 0;
  border-bottom: 1px solid var(--df-patch-border);
  padding-inline: 12px;
  font: 400 12px/18px var(--df-patch-mono);
}

.df-patch-code {
  --diffs-font-family: var(--df-patch-mono);
  --diffs-header-font-family: var(--font-sans);
  --diffs-font-size: 12px;
  --diffs-line-height: 20px;
  --diffs-gap-inline: 0px;
  --diffs-gap-block: 0px;
  --diffs-bg-separator-override: light-dark(
    #f2f2f2,
    var(--color-surface-elevated)
  );
  --diffs-fg-number-override: light-dark(#6e6e6e, var(--color-text-secondary));
  --diffs-fg-number-addition-override: light-dark(#267a3d, var(--df-patch-add));
  --diffs-fg-number-deletion-override: var(--df-patch-remove);
  --df-patch-add-bg: light-dark(#e6f5e6, #213b2b);
  --df-patch-remove-bg: light-dark(#ffebea, #482a2a);
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 8px 12px 8px 14px;
}

.df-patch-text {
  padding: 12px;
  color: var(--color-text-secondary);
}

.df-patch-text > p {
  margin: 0 0 8px;
}

.df-patch-text summary {
  cursor: pointer;
}

@container (max-width: 580px) {
  .df-patch-body {
    flex-direction: column;
  }
  .df-patch-files {
    flex: 0 1 auto;
    max-height: 128px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--df-patch-border);
  }
  .df-patch-selected {
    min-height: 0;
  }
}

SHA-256: 28b1c6d9a5084edd7712696984f4f51c684366f6188aa69dd455b0c73d4a0250