Skip to content
Draft
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
3 changes: 2 additions & 1 deletion packages/site_shared/lib/_sass/components/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ pre {
}

// Border and resizability for dartpad
iframe[src^="https://dartpad"] {
iframe[src^="https://dartpad"],
iframe[src^="https://preview.dartpad"] {
margin-bottom: 1rem;
min-height: 400px;
resize: vertical;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class EmbeddedDartPad extends StatefulComponent {
/// It must be unique within the document and a valid HTML element ID.
///
/// The [scheme] and [host] are used to construct the DartPad iframe URL.
/// [scheme] defaults to 'https' and [host] defaults to 'dartpad.dev'.
/// [scheme] defaults to 'https' and [host] defaults to 'preview.dartpad.dev'.
///
/// To control the appearance of the embedded DartPad,
/// you can switch to the [embedLayout] and choose a specific [theme].
Expand All @@ -58,7 +58,7 @@ final class EmbeddedDartPad extends StatefulComponent {
}) {
final dartPadUrl = Uri(
scheme: scheme ?? 'https',
host: host ?? 'dartpad.dev',
host: host ?? 'preview.dartpad.dev',
queryParameters: <String, String>{
if (embedLayout ?? true) 'embed': '$embedLayout',
if (theme != DartPadTheme.auto) 'theme': '$theme',
Expand Down
3 changes: 2 additions & 1 deletion sites/docs/lib/_sass/base/_print-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
}

// Remove DartPad iframes since they are not functional.
iframe[src^="https://dartpad"]:not(#try-dart-pad) {
iframe[src^="https://dartpad"]:not(#try-dart-pad),
iframe[src^="https://preview.dartpad"]:not(#try-dart-pad) {
display: none;
}

Expand Down
Loading