Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): basic styles no longer affect global styles #42

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/stale-bobcats-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@difizen/mana-observable": patch
"@difizen/mana-syringe": patch
"@difizen/mana-common": patch
"@difizen/mana-react": patch
"@difizen/mana-core": patch
"@difizen/mana-l10n": patch
"@difizen/mana-app": patch
"@difizen/mana-ui": patch
"@difizen/mana-docs": patch
---

basic styles no longer affect global styles.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ pnpm-lock.yaml
**/*/mana-react/src/**
tinyColor.less

.changeset
46 changes: 33 additions & 13 deletions packages/mana-app/src/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,44 @@ body,
background: var(--mana-editor-background);
color: var(--mana-foreground);
font-family: var(--mana-ui-font-family);
}

a {
color: var(--mana-textLink-foreground);
}
a {
color: var(--mana-textLink-foreground);
}

a:active,
a:hover {
color: var(--mana-textLink-activeForeground);
}
a:active,
a:hover {
color: var(--mana-textLink-activeForeground);
}

code {
color: var(--mana-textPreformat-foreground);
}

code {
color: var(--mana-textPreformat-foreground);
blockquote {
background: var(--vscode-textBlockQuote-background);
border: var(--mana-border-width) solid var(--mana-textBlockQuote-border);
}
}

blockquote {
background: var(--vscode-textBlockQuote-background);
border: var(--mana-border-width) solid var(--mana-textBlockQuote-border);
.mana-view-container {
a {
color: var(--mana-textLink-foreground);
}

a:active,
a:hover {
color: var(--mana-textLink-activeForeground);
}

code {
color: var(--mana-textPreformat-foreground);
}

blockquote {
background: var(--vscode-textBlockQuote-background);
border: var(--mana-border-width) solid var(--mana-textBlockQuote-border);
}
}

.mana-input {
Expand Down
19 changes: 18 additions & 1 deletion packages/mana-common/src/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
return left.includes(right);
}

protected sameOrigin(uri: URI): boolean {
sameOrigin(uri: URI): boolean {
return this.authority === uri.authority && this.scheme === uri.scheme;
}

Expand Down Expand Up @@ -164,4 +164,21 @@
});
return new URI(newCodeUri);
}

static sameOrigin(uriA: URI, uriB: URI): boolean {
return uriA.authority === uriB.authority && uriA.scheme === uriB.scheme;
}

Check warning on line 170 in packages/mana-common/src/uri.ts

View check run for this annotation

Codecov / codecov/patch

packages/mana-common/src/uri.ts#L169-L170

Added lines #L169 - L170 were not covered by tests

static isEqualOrParent(uriA: URI, uriB: URI, caseSensitive = true): boolean {
if (!URI.sameOrigin(uriA, uriB)) {
return false;
}
let left = uriA.path;
let right = uriB.path;
if (!caseSensitive) {
left = new Path(left.toString().toLowerCase());
right = new Path(right.toString().toLowerCase());
}
return !!Path.relative(left, right);
}

Check warning on line 183 in packages/mana-common/src/uri.ts

View check run for this annotation

Codecov / codecov/patch

packages/mana-common/src/uri.ts#L173-L183

Added lines #L173 - L183 were not covered by tests
}
Loading