LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Sunday, May 26, 2019

Googleアドオン開発のCSSパッケージ


<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">

↑を<head></head>内に入れておく


テキストボックスとボタンを表示する例

スタイルを設定しなくてもガイドに沿ったスタイルを適用してくれる


スタイルを読み込まない場合はこうなる



コード.gs
function doGet() {
  return HtmlService.createHtmlOutputFromFile("index");
}
意訳
この機能がやること
指定したHTMLファイルを表示する




index.html
<!DOCTYPE html>
<html>

<head>
  <link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>

<body>
  <input type='text'>
  <button>button</button>
</body>

</html>
意訳
これはHTML5文書です



スタイルを読み込む



テキストボックス
ボタン





参考

CSS package for editor add-ons
https://developers.google.com/gsuite/add-ons/guides/css

CSSの中身

Latest post

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...