什么是.csx文件?

时间:2015-08-01 11:54:08

标签: css

查看Microsoft Edge homepage的来源,页面的样式表加载为: -

<link rel="stylesheet" type="text/css" href="https://c.s-microsoft.com/en-gb/CMSStyles/style.csx?k=eb892833-0e5a-b8c0-2921-57013ef132d9_f05cbaf8-1aa4-2e42-0beb-040a76f09433_e688a192-b2e5-4598-dec4-9340a1bb6723_6e5b2ac7-688a-4a18-9695-a31e8139fa0f_b3dad3e4-0853-1041-fa46-2e9d6598a584_fc29d27f-7342-9cf3-c2b5-a04f30605f03_a66bb9d1-7095-dfc6-5a12-849441da475c_1b0ca1a3-6da9-0dbf-9932-198c9f68caeb_ef11258b-15d1-8dab-81d5-8d18bc3234bc_11339d5d-cf04-22ad-4987-06a506090313_176b8afa-bab9-e793-c91f-d22b5a134b6e_8031d0e3-4981-8dbc-2504-bbd5121027b7_3f0c3b77-e132-00a5-3afc-9a2f141e9eae_aebeacd9-6349-54aa-9608-cb67eadc2d17_0cdb912f-7479-061d-e4f3-bea46f10a753_343d1ae8-c6c4-87d3-af9d-4720b6ea8f34_a905814f-2c84-2cd4-839e-5634cc0cc383_190a3885-bf35-9fab-6806-86ce81df76f6_9a16c79d-25f5-bdfe-5f2f-db073a7c44a9_e35b6b5f-66da-dedc-3f00-745165d9153a_469a8551-3011-f265-8b8f-5929dc69c497_788198f9-9eef-398f-9683-0cfdba85933d_bfafe587-a6ac-831e-ddf2-924fd9c72cdf_cab08b69-d2f0-1170-14b6-3c3a28953f9f" />

进一步深入style.csx的源代码,文件的语法类似于scss,例如: -

@mixin font-face($family, $set, $weight, $locals: (), $version: latest){
  $local-fonts: '';
  @if $supports-local == true {
    @each $item in $locals {
      $local-fonts: #{$local-fonts} + 'local("' + #{$item} + '"),';
    }
  }
  @font-face {
    font-family: 'wf_' + #{$family} + '_' + #{$weight};
    src: url('//i.s-microsoft.com/fonts/#{$family}/#{$set}/#{$weight}/#{$version}.eot');
    src: #{$local-fonts} +
         url('//i.s-microsoft.com/fonts/#{$family}/#{$set}/#{$weight}/#{$version}.eot?#iefix') format('embedded-opentype'),
         url('//i.s-microsoft.com/fonts/#{$family}/#{$set}/#{$weight}/#{$version}.woff') format('woff'),
         url('//i.s-microsoft.com/fonts/#{$family}/#{$set}/#{$weight}/#{$version}.ttf') format('truetype'),
         url('//i.s-microsoft.com/fonts/#{$family}/#{$set}/#{$weight}/#{$version}.svg#web') format('svg');
    font-weight: normal;
    font-style: normal;
  }
}

谷歌没有引导我看到在这种情况下似乎与csx有关的任何事情 - 这不是C#,似乎与处理css文件的jquery plugin called csx无关。 / p>

那么,在这种情况下,csx文件到底是什么?它是否需要javascript客户端处理(Chrome中的页面呈现得很好)并且使用这种方式对csx有什么好处,例如,预编译的scss?

1 个答案:

答案 0 :(得分:0)

在这种情况下.CSX几乎肯定是C# scripting。您看到的是该脚本的生成输出而不是文件style.csx

的来源