Skip to content

The Open Standard for Generative UI

1.1 KB
Raw Blame
@use "../../cssUtils" as cssUtils;

// ThemeModeToggle (ThemeModeToggle.tsx): a round 32px icon button, the rail's
// button size, in the sidebar footer. Expanded, it is pulled 3px left so its
// glyph sits on the nav icons' column; on the collapsed rail it fills the
// control column like the buttons above it.
.openui-agent-theme-toggle {
  @include cssUtils.button-reset;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: -3px;
  flex-shrink: 0;
  border-radius: cssUtils.$radius-full;
  color: cssUtils.$text-neutral-secondary;
  font-size: 14px;
  cursor: pointer;
  transition:
    background-color 90ms cubic-bezier(0.22, 1, 0.36, 1),
    color 90ms cubic-bezier(0.22, 1, 0.36, 1);

  &:hover {
    background-color: cssUtils.$highlight-strong;
    color: cssUtils.$text-neutral-primary;
  }

  &:focus-visible {
    outline: 2px solid cssUtils.$border-interactive;
    outline-offset: 2px;
  }

  .openui-agent-sidebar-container--collapsed &,
  .openui-agent-container--mobile & {
    margin-left: 0;
  }
}