Skip to content

Commit

Permalink
Merge branch 'main' into feat/type-system-implicit-casts
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Mar 7, 2025
2 parents 9c7687a + d881e8d commit a4175df
Show file tree
Hide file tree
Showing 9 changed files with 1,634 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/hast": "^3.0.4",
"@types/markdown-it": "^14.1.2",
"@types/node": "^22.13.9",
"firebase-tools": "^13.32.0",
"firebase-tools": "^13.33.0",
"hast-util-from-html": "^2.0.3",
"hast-util-select": "^6.0.4",
"hast-util-to-text": "^4.0.2",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 23 additions & 3 deletions src/_sass/components/_tags.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use '../base/variables' as *;
@use '../base/mixins';

.tag-label {
user-select: none;
Expand Down Expand Up @@ -26,20 +27,20 @@
background-color: #DADCE0;
}

.lint-tags {
.tags {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 0.5rem;

div.tag-label {
.tag-label {
display: flex;
flex-direction: row;
align-items: center;
background-color: rgb(194 229 255);
gap: 0.25rem;
font-size: 1rem;
padding: 0.15rem 0.5rem;
padding: 0.1rem 0.4rem;

span.material-symbols {
fill: currentcolor;
Expand All @@ -60,4 +61,23 @@
background-color: rgb(255, 205, 200);
}
}

span.tag-label {
display: inline-flex;
}

a.tag-label {
text-decoration: none;
color: inherit;

&:hover {
@include mixins.interaction-style(6%);
text-decoration: none;
}

&:active {
@include mixins.interaction-style(10%);
text-decoration: none;
}
}
}
8 changes: 6 additions & 2 deletions src/content/effective-dart/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ giving the class an obvious name like `IterableBase`. If the author of the class
doesn't do that, it's best to assume you should *not* extend the class.
Otherwise, later changes to it may break your code.

<a id="do-document-if-your-class-supports-being-extended" aria-hidden="true"></a>

### DO use class modifiers to control if your class can be extended

Expand Down Expand Up @@ -653,6 +654,8 @@ implicit interfaces except for classes that are clearly intended to be
implemented. Otherwise, you may introduce a coupling that the author doesn't
intend, and they may break your code without realizing it.

<a id="do-document-if-your-class-supports-being-used-as-an-interface" aria-hidden="true"></a>

### DO use class modifiers to control if your class can be an interface

When designing a library, use class modifiers like `final`, `base`, or `sealed` to enforce intended
Expand All @@ -662,8 +665,9 @@ While it's ideal for all libraries to use these modifiers to enforce design inte
developers may still encounter cases where they aren't applied. In such cases, be mindful of
unintended implementation issues.

<a id="do-use-mixin-to-define-a-mixin-type"></a>
<a id="avoid-mixing-in-a-class-that-isnt-intended-to-be-a-mixin"></a>
<a id="do-use-mixin-to-define-a-mixin-type" aria-hidden="true"></a>
<a id="avoid-mixing-in-a-class-that-isnt-intended-to-be-a-mixin" aria-hidden="true"></a>

### PREFER defining a pure `mixin` or pure `class` to a `mixin class`

{% render 'linter-rule-mention.md', rules:'prefer_mixin' %}
Expand Down
2 changes: 2 additions & 0 deletions src/content/resources/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ The following are definitions of terms used across the Dart documentation.
code_blocks
{% when "diagnostic", "lint" %}
lightbulb
{% when "lint" %}
toggle_on
{% else %}
article
{% endcase -%}
Expand Down
Loading

0 comments on commit a4175df

Please sign in to comment.