Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions pkg/web_app/lib/src/widget/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:web/web.dart';

import '../web_util.dart';
import 'completion/widget.dart' deferred as completion;
import 'switch/widget.dart' deferred as switch_;
import 'switch/widget.dart' as switch_;

/// Function to create an instance of the widget given an element and options.
///
Expand All @@ -32,7 +32,7 @@ typedef _WidgetLoaderFn = FutureOr<_WidgetFn> Function();
/// Map from widget name to widget loader
final _widgets = <String, _WidgetLoaderFn>{
'completion': () => completion.loadLibrary().then((_) => completion.create),
'switch': () => switch_.loadLibrary().then((_) => switch_.create),
'switch': () => switch_.create,
};

Future<_WidgetFn> _noSuchWidget() async =>
Expand Down
26 changes: 14 additions & 12 deletions pkg/web_css/lib/src/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -393,30 +393,32 @@ pre {
text-align: center;

.dismisser {
float: right;
position: absolute;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure: does this need a position: relative in the parent element?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so...

display: inline-block;
right: 0px;
padding: 5px 15px;
margin-top: -5px;
cursor: pointer;
user-select: none;
}

&.dismissed {
visibility: hidden;
display: none;
}

z-index: 0;
animation-duration: 200ms;
animation-name: slide-down;
animation-timing-function: ease;
z-index: 1000;

position: absolute;
left: 0px;
right: 0px;
}

@keyframes slide-down {
from {
translate: 0 -100%;
}
.page-standalone .announcement-banner {
position: initial;

to {
translate: 0 0;
&.dismissed {
display: block;
visibility: hidden;
}
}

Expand Down
Loading