Skip to content

Commit d37326b

Browse files
committed
fix: Moves styles from CSS to HTML so HTML can be freestanding.
1 parent cfd0535 commit d37326b

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

samples/web-components-markers/index.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<!--
33
@license
44
Copyright 2025 Google LLC. All Rights Reserved.
@@ -15,8 +15,19 @@
1515
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&libraries=maps,marker&v=weekly"
1616
defer
1717
></script>
18+
<style>
19+
gmp-map {
20+
height: 100%;
21+
}
22+
html,
23+
body {
24+
height: 100%;
25+
margin: 0;
26+
padding: 0;
27+
}
28+
</style>
1829
</head>
19-
<body>
30+
<body style="height: 100%">
2031
<!-- [START maps_web_components_markers_div] -->
2132
<gmp-map
2233
center="41.027748173921374, -92.41852445367961"

samples/web-components-markers/style.css

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,5 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* [START maps_web_components_markers] */
7-
/*
8-
* Always set the map height explicitly to define the size of the div element
9-
* that contains the map.
10-
*/
11-
gmp-map {
12-
height: 100%;
13-
}
14-
15-
/*
16-
* Optional: Makes the sample page fill the window.
17-
*/
18-
html,
19-
body {
20-
height: 100%;
21-
margin: 0;
22-
padding: 0;
23-
}
7+
/* Note: This CSS file is intentionally blank. */
248
/* [END maps_web_components_markers] */

0 commit comments

Comments
 (0)