Skip to content

Commit 5932920

Browse files
authored
fix: Moves styles from CSS to HTML so HTML can be freestanding. (#948)
* fix: Moves styles from CSS to HTML so HTML can be freestanding. * Remove stylesheet link from index.html Removed the stylesheet link and inline styles from the HTML file, since the style block takes care of that. * Reorder script tags in index.html
1 parent cfd0535 commit 5932920

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

samples/web-components-markers/index.html

Lines changed: 12 additions & 3 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.
@@ -8,8 +8,17 @@
88
<html>
99
<head>
1010
<title>Add a Map with Markers using HTML</title>
11-
12-
<link rel="stylesheet" type="text/css" href="./style.css" />
11+
<style>
12+
gmp-map {
13+
height: 100%;
14+
}
15+
html,
16+
body {
17+
height: 100%;
18+
margin: 0;
19+
padding: 0;
20+
}
21+
</style>
1322
<script type="module" src="./index.js"></script>
1423
<script
1524
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&libraries=maps,marker&v=weekly"

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)