瀏覽代碼

Removing less usage.

Brian E. Granger 8 年之前
父節點
當前提交
4c30b63c18
共有 4 個文件被更改,包括 244 次插入252 次删除
  1. 1 1
      package.json
  2. 31 34
      src/codemirror/index.css
  3. 23 23
      src/default-theme/index.css
  4. 189 194
      src/renderers/index.css

+ 1 - 1
package.json

@@ -58,7 +58,7 @@
     "build:test": "tsc --project test/src && webpack --config test/webpack.conf.js",
     "build:serverextension": "cd jupyterlab && npm run build && cd ..",
     "build:css": "true",
-    "build:less": "lessc --strict-math=on --include-path=node_modules src/default-theme/index.less lib/default-theme/index.css",
+    "build:less": "lessc --strict-math=on --include-path=node_modules src/default-theme/index.css lib/default-theme/index.css",
     "clean": "rimraf docs && rimraf lib && rimraf test/build && rimraf test/coverage",
     "clean:all": "npm run clean && cd jupyterlab && npm run clean && cd ..",
     "clean:examples": "node scripts/cleanexamples.js",

+ 31 - 34
src/codemirror/index.css

@@ -24,38 +24,35 @@
 // The string "jupyter" is set in ../codemirror/widget.DEFAULT_CODEMIRROR_THEME
 // This came from the classic notebook, which came form highlight.js/GitHub
 
-@jp-theme-variable-color: #000;
-
-.cm-s-jupyter span {
-
-  &.cm-keyword      { color: #008000; font-weight: bold; }
-  &.cm-atom         { color: #88F; }
-  &.cm-number       { color: #080; }
-  &.cm-def          { color: #00f; }
-  &.cm-variable     { color: @jp-theme-variable-color; }
-  &.cm-variable-2   { color: lighten(@jp-theme-variable-color, 10%); }
-  &.cm-variable-3   { color: lighten(@jp-theme-variable-color, 20%); }
-  &.cm-punctuation  {  }
-  &.cm-property     {  }
-  &.cm-operator     { color: #AA22FF; font-weight: bold; }
-  &.cm-comment      { color: #408080; font-style: italic; }
-  &.cm-string       { color: #BA2121; }
-  &.cm-string-2     { color: #f50; }
-  &.cm-meta         { color: #AA22FF; }
-  &.cm-qualifier    { color: #555; }
-  &.cm-builtin      { color: #008000; }
-  &.cm-bracket      { color: #997; }
-  &.cm-tag          { color: #170; }
-  &.cm-attribute    { color: #00c; }
-  &.cm-header       { color: blue; }
-  &.cm-quote        { color: #090; }
-  &.cm-link         { color: #00c; }
-  &.cm-error        { color: #f00; }
-  &.cm-hr           { color: #999; }
-
-  &.cm-tab {
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
-    background-position: right;
-    background-repeat: no-repeat;
-  }
+
+.cm-s-jupyter span.cm-keyword      { color: #008000; font-weight: bold; }
+.cm-s-jupyter span.cm-atom         { color: #88F; }
+.cm-s-jupyter span.cm-number       { color: #080; }
+.cm-s-jupyter span.cm-def          { color: #00f; }
+.cm-s-jupyter span.cm-variable     { color: --md-grey-900 }
+.cm-s-jupyter span.cm-variable-2   { color: --md-grey-800 }
+.cm-s-jupyter span.cm-variable-3   { color: --md-grey-700 }
+.cm-s-jupyter span.cm-punctuation  {  }
+.cm-s-jupyter span.cm-property     {  }
+.cm-s-jupyter span.cm-operator     { color: #AA22FF; font-weight: bold; }
+.cm-s-jupyter span.cm-comment      { color: #408080; font-style: italic; }
+.cm-s-jupyter span.cm-string       { color: #BA2121; }
+.cm-s-jupyter span.cm-string-2     { color: #f50; }
+.cm-s-jupyter span.cm-meta         { color: #AA22FF; }
+.cm-s-jupyter span.cm-qualifier    { color: #555; }
+.cm-s-jupyter span.cm-builtin      { color: #008000; }
+.cm-s-jupyter span.cm-bracket      { color: #997; }
+.cm-s-jupyter span.cm-tag          { color: #170; }
+.cm-s-jupyter span.cm-attribute    { color: #00c; }
+.cm-s-jupyter span.cm-header       { color: blue; }
+.cm-s-jupyter span.cm-quote        { color: #090; }
+.cm-s-jupyter span.cm-link         { color: #00c; }
+.cm-s-jupyter span.cm-error        { color: #f00; }
+.cm-s-jupyter span.cm-hr           { color: #999; }
+
+.cm-s-jupyter span.cm-tab {
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
+  background-position: right;
+  background-repeat: no-repeat;
 }
+

+ 23 - 23
src/default-theme/index.css

@@ -5,34 +5,34 @@
 
 
 // Variables and mixins
-@import '../basestyle/materialcolors.less';
-@import './variables.less';
+@import '../basestyle/materialcolors.css';
+@import './variables.css';
 
 
 // Main application (1st)
-@import '../application/index.less';
+@import '../application/index.css';
 
 
 // Individual plugins
-@import '../about/index.less';
-@import '../codemirror/index.less';
-@import '../commandpalette/index.less';
-@import '../console/index.less';
-@import '../csvwidget/index.less';
-@import '../dialog/index.less';
-@import '../editorwidget/index.less';
-@import '../faq/index.less';
-@import '../filebrowser/index.less';
-@import '../help/index.less';
-@import '../iframe/index.less';
-@import '../imagewidget/index.less';
-@import '../inspector/index.less';
-@import '../landing/index.less';
-@import '../markdownwidget/index.less';
-@import '../notebook/index.less';
-@import '../renderers/index.less';
-@import '../running/index.less';
-@import '../terminal/index.less';
+@import '../about/index.css';
+@import '../codemirror/index.css';
+@import '../commandpalette/index.css';
+@import '../console/index.css';
+@import '../csvwidget/index.css';
+@import '../dialog/index.css';
+@import '../editorwidget/index.css';
+@import '../faq/index.css';
+@import '../filebrowser/index.css';
+@import '../help/index.css';
+@import '../iframe/index.css';
+@import '../imagewidget/index.css';
+@import '../inspector/index.css';
+@import '../landing/index.css';
+@import '../markdownwidget/index.css';
+@import '../notebook/index.css';
+@import '../renderers/index.css';
+@import '../running/index.css';
+@import '../terminal/index.css';
 
 // Theme images
-@import './images.less';
+@import './images.css';

+ 189 - 194
src/renderers/index.css

@@ -10,283 +10,278 @@
   font-size: 14px;
   line-height: 20px;
 
-  .MathJax_Display {
-    margin: 0;
-  }
-
-
-  em {
-    font-style: italic;
-  }
+}
 
-  strong {
-    font-weight: bold;
-  }
+.jp-RenderedHTMLCommon .MathJax_Display {
+  margin: 0;
+}
 
-  u {
-    text-decoration: underline;
-  }
 
-  :link {
-    text-decoration: underline;
-  }
+.jp-RenderedHTMLCommon em {
+  font-style: italic;
+}
 
-  :visited {
-    text-decoration: underline;
-  }
+.jp-RenderedHTMLCommon strong {
+  font-weight: bold;
+}
 
-  /*For a 14px base font size this goes as:
-  font-size = 26, 22, 18, 14, 12, 12
-  margin-top = 14, 14, 14, 14, 8, 8
-  */
+.jp-RenderedHTMLCommon u {
+  text-decoration: underline;
+}
 
-  h1 {
-    font-size: 185.7%;
-    margin: 1.08em 0 0 0;
-    font-weight: bold;
-    line-height: 1.0;
-  }
+.jp-RenderedHTMLCommon:link {
+  text-decoration: underline;
+}
 
+.jp-RenderedHTMLCommon:visited {
+  text-decoration: underline;
+}
 
-  h2 {
-    font-size: 157.1%;
-    margin: 1.27em 0 0 0;
-    font-weight: bold;
-    line-height: 1.0;
-  }
+/*For a 14px base font size this goes as:
+font-size = 26, 22, 18, 14, 12, 12
+margin-top = 14, 14, 14, 14, 8, 8
+*/
 
+.jp-RenderedHTMLCommon h1 {
+  font-size: 185.7%;
+  margin: 1.08em 0 0 0;
+  font-weight: bold;
+  line-height: 1.0;
+}
 
-  h3 {
-    font-size: 128.6%;
-    margin: 1.55em 0 0 0;
-    font-weight: bold;
-    line-height: 1.0;
-  }
 
+.jp-RenderedHTMLCommon h2 {
+  font-size: 157.1%;
+  margin: 1.27em 0 0 0;
+  font-weight: bold;
+  line-height: 1.0;
+}
 
-  h4 {
-    font-size: 100%;
-    margin: 2em 0 0 0;
-    font-weight: bold;
-    line-height: 1.0;
-  }
 
+.jp-RenderedHTMLCommon h3 {
+  font-size: 128.6%;
+  margin: 1.55em 0 0 0;
+  font-weight: bold;
+  line-height: 1.0;
+}
 
-  h5 {
-    font-size: 100%;
-    margin: 2em 0 0 0;
-    font-weight: bold;
-    line-height: 1.0;
-    font-style: italic;
-  }
 
+.jp-RenderedHTMLCommon h4 {
+  font-size: 100%;
+  margin: 2em 0 0 0;
+  font-weight: bold;
+  line-height: 1.0;
+}
 
-  h6 {
-    font-size: 100%;
-    margin: 2em 0 0 0;
-    font-weight: bold;
-    line-height: 1.0;
-    font-style: italic;
-  }
 
+.jp-RenderedHTMLCommon h5 {
+  font-size: 100%;
+  margin: 2em 0 0 0;
+  font-weight: bold;
+  line-height: 1.0;
+  font-style: italic;
+}
 
-  h1:first-child {
-    margin-top: 0.538em;
-  }
 
+.jp-RenderedHTMLCommon h6 {
+  font-size: 100%;
+  margin: 2em 0 0 0;
+  font-weight: bold;
+  line-height: 1.0;
+  font-style: italic;
+}
 
-  h2:first-child {
-    margin-top: 0.636em;
-  }
 
+.jp-RenderedHTMLCommon h1:first-child {
+  margin-top: 0.538em;
+}
 
-  h3:first-child {
-    margin-top: 0.777em;
-  }
 
+.jp-RenderedHTMLCommon h2:first-child {
+  margin-top: 0.636em;
+}
 
-  h4:first-child {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon h3:first-child {
+  margin-top: 0.777em;
+}
 
-  h5:first-child {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon h4:first-child {
+  margin-top: 1em;
+}
 
-  h6:first-child {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon h5:first-child {
+  margin-top: 1em;
+}
 
-  ul:not(.list-inline),
-  ol:not(.list-inline) {
-    padding-left: 2em;
-  }
 
+.jp-RenderedHTMLCommon h6:first-child {
+  margin-top: 1em;
+}
 
-  ul {
-    list-style: disc;
-  }
 
+.jp-RenderedHTMLCommon ul:not(.list-inline),
+.jp-RenderedHTMLCommon ol:not(.list-inline) {
+  padding-left: 2em;
+}
 
-  ul ul {
-    list-style: square;
-  }
 
+.jp-RenderedHTMLCommon ul {
+  list-style: disc;
+}
 
-  ul ul ul {
-    list-style: circle;
-  }
 
+.jp-RenderedHTMLCommon ul ul {
+  list-style: square;
+}
 
-  ol {
-    list-style: decimal;
-  }
 
+.jp-RenderedHTMLCommon ul ul ul {
+  list-style: circle;
+}
 
-  ol ol {
-    list-style: upper-alpha;
-  }
 
+.jp-RenderedHTMLCommon ol {
+  list-style: decimal;
+}
 
-  ol ol ol {
-    list-style: lower-alpha;
-  }
 
+.jp-RenderedHTMLCommon ol ol {
+  list-style: upper-alpha;
+}
 
-  ol ol ol ol {
-    list-style: lower-roman;
-  }
 
+.jp-RenderedHTMLCommon ol ol ol {
+  list-style: lower-alpha;
+}
 
-  ol ol ol ol ol {
-    list-style: decimal;
-  }
 
+.jp-RenderedHTMLCommon ol ol ol ol {
+  list-style: lower-roman;
+}
 
-  * + ul {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon ol ol ol ol ol {
+  list-style: decimal;
+}
 
-  * + ol {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon * + ul {
+  margin-top: 1em;
+}
 
-  hr {
-    color: black;
-    background-color: black;
-    margin-top: 1em;
-    margin-bottom: 1em;
-  }
 
+.jp-RenderedHTMLCommon * + ol {
+  margin-top: 1em;
+}
 
-  pre {
-    margin: 1em 2em;
-  }
 
+.jp-RenderedHTMLCommon hr {
+  color: black;
+  background-color: black;
+  margin-top: 1em;
+  margin-bottom: 1em;
+}
 
-  pre,
-  code {
-    border: 0;
-    background-color: white;
-    color: black;
-    font-size: 100%;
-    padding: 0px;
-  }
 
+.jp-RenderedHTMLCommon pre {
+  margin: 1em 2em;
+}
 
-  blockquote {
-    margin: 1em 2em;
-  }
 
+.jp-RenderedHTMLCommon pre,
+.jp-RenderedHTMLCommon code {
+  border: 0;
+  background-color: white;
+  color: black;
+  font-size: 100%;
+  padding: 0px;
+}
 
-  table {
-    margin-left: auto;
-    margin-right: auto;
-    border: var(--jp-borderWidth) solid black;
-    border-collapse: collapse;
-  }
 
+.jp-RenderedHTMLCommon table {
+  margin-left: auto;
+  margin-right: auto;
+  border: var(--jp-borderWidth) solid black;
+  border-collapse: collapse;
+}
 
-  tr,
-  th,
-  td {
-    border: var(--jp-borderWidth) solid black;
-    border-collapse: collapse;
-    margin: 1em 2em;
-  }
 
+.jp-RenderedHTMLCommon tr,
+.jp-RenderedHTMLCommon th,
+.jp-RenderedHTMLCommon td {
+  border: var(--jp-borderWidth) solid black;
+  border-collapse: collapse;
+  margin: 1em 2em;
+}
 
-  td,
-  th {
-    text-align: left;
-    vertical-align: middle;
-    padding: 4px;
-  }
 
+.jp-RenderedHTMLCommon td,
+.jp-RenderedHTMLCommon th {
+  text-align: left;
+  vertical-align: middle;
+  padding: 4px;
+}
 
-  th {
-    font-weight: bold;
-  }
 
-  * + table {
-    margin-top: 1em;
-  }
+.jp-RenderedHTMLCommon th {
+  font-weight: bold;
+}
 
+.jp-RenderedHTMLCommon * + table {
+  margin-top: 1em;
+}
 
-  p {
-    text-align: left;
-    margin: 0px;
-  }
 
+.jp-RenderedHTMLCommon p {
+  text-align: left;
+  margin: 0px;
+}
 
-  * + p {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon * + p {
+  margin-top: 1em;
+}
 
-  img {
-    display: block;
-    margin-left: auto;
-    margin-right: auto;
-  }
 
+.jp-RenderedHTMLCommon img {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
 
-  * + img {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon * + img {
+  margin-top: 1em;
+}
 
-  img,
-  svg {
-    max-width: 100%;
-    height: auto;
-  }
 
+.jp-RenderedHTMLCommon img,
+.jp-RenderedHTMLCommon svg {
+  max-width: 100%;
+  height: auto;
+}
 
-  img.unconfined,
-  svg.unconfined {
-    max-width: none;
-  }
 
-  .alert {
-    margin-bottom: initial;
-  }
+.jp-RenderedHTMLCommon img.unconfined,
+.jp-RenderedHTMLCommon svg.unconfined {
+  max-width: none;
+}
 
+.jp-RenderedHTMLCommon .alert {
+  margin-bottom: initial;
+}
 
-  * + .alert {
-    margin-top: 1em;
-  }
 
+.jp-RenderedHTMLCommon * + .alert {
+  margin-top: 1em;
+}
 
-  blockquote {
-    margin: 1em 2em;
-    padding: 0 1em;
-    border-left: 5px solid var(--jp-borderColor2);
-  }
 
+.jp-RenderedHTMLCommon blockquote {
+  margin: 1em 2em;
+  padding: 0 1em;
+  border-left: 5px solid var(--jp-borderColor2);
 }