Commit Graph

8 Commits

Author SHA1 Message Date
Joey Parrish c1b109aabc fix: Correct license headers in CSS/LESS
This corrects/normalizes the license headers in CSS and LESS files.
The LESS tool respects the same "/*!" syntax for forcing the inclusion
of a license header, but will not dedup these licenses.  So the LESS
files generally will not use this syntax.  Instead, the build system
prepends a license header after compilation.

The exception is for our SVG spinner, which is based on third-party
CSS from codepen.  The copyright header for this is forced into the
output to give proper credit to the original author.

Issue #2638

Change-Id: I4c58e2b082f2d5e550a6f0a30feaaf9ebf82a53a
2020-06-09 16:19:38 -07:00
Theodore Abshire f24c4a783f Added stylelint, a linter for our CSS/less files.
Also unified CSS/less style based on that.
This does have to use a forked version of stylelint, since there
is a bug (?) in the globbing library they use that causes it to
fail on our buildbot. I found the simplest solution was just to add
an option to disable globbing, a feature we weren't using anyway.

Closes #1867

Change-Id: I9295b01d5b15d060356e314938b64b551b75de6a
2019-08-08 18:38:19 +00:00
Joey Parrish 58cedb0367 Add @license to all LESS and CSS files
Change-Id: Ibefe715afcb3676d5a2694032b9c99fe98dd2c44
2019-05-10 17:26:14 +00:00
Joey Parrish 51c31468f4 Fix percentage-width sizing for play button
This takes a completely different approach to play button sizing.  The
intended effect is the same, but this method uses padding to achieve a
1:1 aspect ratio instead of the size of the spinner contained within.

Because the spinner was sometimes hidden with display:none, it would
not take up any space in that state, causing the play button size to
collapse as well.  By using padding and overlay mixins instead, the
play button size is independent of the spinner size.

Closes #1749

Change-Id: I2e46f067283001ca2f2db44c0c6ea675ea781f46
2019-01-14 22:34:35 +00:00
Joey Parrish 49fbade422 Simplify the buffering spinner layout
- Drop the containing div
 - Move the SVG inside the play button
 - Drop overlay semantics, let the button simply contain the spinner
 - Change SVG coordinates to fill the viewbox

The SVG size is now matched to the size of the play button, and only
the button needs to be resized to resize both the button and spinner.

Prework for b/116328412, #1715

Change-Id: Ie1386f5f269978763adb36b77defe040e3aab503
2018-12-12 15:34:04 -08:00
Joey Parrish 2379c4485c Refactor and clean up CSS/Less, and controls JS
- Make shaka-overlay-parent a mixin instead of an actual class
   - Fox maximum stylability, it should be the job of the styles to
     position and overlay objects without JS code declaring that it be
     so.
 - The "seek to live" effect of clicking the current time no longer
   depends on the seek bar being used
 - The shaka-transparent class is not needed.  The controls are now
   set to be opaque based on an attribute.
 - Use an attribute for casting state as well.
 - Remove redundant opacity transition on play button.  It is already
   on the controls overlay as a whole.
 - Make layout more generic, which allows us to remove some explicit
   positioning and browser-specific layout hacks.
 - Rename user-select(), whose value is always the default of "none",
   to unselectable().
 - Remove unnecessary or redundant styles.
 - Apply the same default styles to all control elements, whether
   buttons, divs, or inputs.
 - Make overlay-parent() and overlay-child() more resilient with
   settings to fill space by default.
 - Consolidate the setting of displayed & hidden in JS.

Pre-work for #1703, #1709 (IE style fixes)

Makes progress on b/116651454 (hard-coded offsets)

Change-Id: I7ea579429979afa98f5b2c54f68114312c4f508d
2018-12-07 22:07:13 -08:00
Joey Parrish bab073932a Improve CSS/Less comments
This doesn't start refactoring, but does move a couple of lines around
to group them in clearer ways.  It also adds lots of comments
explaining what things are, what they are for, and where they appear.

Pre-work for #1703, #1709, and b/116651454

Change-Id: I77a76c569e4e426b040eaf55f900baa38414fc0c
2018-12-07 23:27:00 +00:00
Joey Parrish 9f2b4ef617 Split up less/CSS into several files
This doesn't change any styles.  It just splits related styles into
several separate files, so that things are easier to find.

Pre-work for #1703, #1709, and b/116651454

Change-Id: Icd3330a70ca6c8ff313991c127f8036238cae813
2018-12-07 10:09:37 -08:00