Skip to content

Commit

Permalink
[#73398] improve MystEditorGit styling on a light background
Browse files Browse the repository at this point in the history
  • Loading branch information
Trzcin committed Mar 3, 2025
1 parent 5d6a4f1 commit 79458ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/myst-git/MystEditorGit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import Select from "./Select";
import * as Y from "yjs";
import CommitModal, { Popup } from "./CommitModal";
import { useWatchChanges } from "./useWatchChanges";
import { MystCSSVars } from "../styles/MystStyles";

const MystContainer = styled.div`
const MystContainer = styled(MystCSSVars)`
--text: black;
color: var(--text);
display: grid;
grid-template-columns: 300px 1fr;
grid-template-rows: 100%;
Expand All @@ -30,7 +33,6 @@ const GitSidebar = styled.div`
label {
display: block;
color: white;
margin-top: 24px;
margin-bottom: 12px;
font-weight: 600;
Expand All @@ -39,7 +41,6 @@ const GitSidebar = styled.div`
`;

const ChangeHistory = styled.div`
color: white;
font-size: 12px;
width: 100%;
Expand All @@ -61,7 +62,7 @@ const ChangeHistory = styled.div`
button {
cursor: pointer;
background: white;
border: none;
border: 1px solid var(--icon-border);
font-family: "Lato";
font-weight: 600;
display: flex;
Expand Down Expand Up @@ -388,7 +389,7 @@ const MystEditorGit = ({
return (
<div style="all: initial;">
<StyleSheetManager target={props.parent}>
<MystContainer>
<MystContainer id="myst-git-container">
<GitSidebar>
<div>
<label>Branch:</label>
Expand Down
1 change: 1 addition & 0 deletions src/myst-git/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const Dropdown = styled.div`
align-items: center;
padding: 10px;
border-radius: var(--border-radius);
border: 1px solid var(--icon-border);
input {
width: 100%;
Expand Down
5 changes: 4 additions & 1 deletion src/styles/MystStyles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";

export const MystContainer = styled.div`
export const MystCSSVars = styled.div`
--border-radius: 5px;
--black: #000;
--gray-900: #333;
Expand Down Expand Up @@ -32,6 +32,9 @@ export const MystContainer = styled.div`
--icon-color: var(--dark-violet);
--separator: var(--gray-500);
--alert: var(--blue-100);
`;

export const MystContainer = styled(MystCSSVars)`
all: initial;
font-family: "Lato", sans-serif;
height: 100%;
Expand Down

0 comments on commit 79458ba

Please sign in to comment.