Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(docs): Build on Windows results in broken docs site and tests #4227

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/menu/_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ angular.module('material.components.menu', [
*
*/

function MenuDirective($mdMenu) {
function MenuDirective() {
var INVALID_PREFIX = 'Invalid HTML for md-menu: ';
return {
restrict: 'E',
Expand Down Expand Up @@ -259,16 +259,16 @@ function MenuController($mdMenu, $attrs, $element, $scope) {
* the offset of top and left in pixels.
*/
function offsets() {
var offsets = ($attrs.mdOffset || '0 0').split(' ').map(parseFloat);
if (offsets.length == 2) {
var topLeftOffsets = ($attrs.mdOffset || '0 0').split(' ').map(parseFloat);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Splaktar - let's resist these types of changes in the future; as they only add noise to the diff log while offering minimal clarity improvements.

if (topLeftOffsets.length == 2) {
return {
left: offsets[0],
top: offsets[1]
left: topLeftOffsets[0],
top: topLeftOffsets[1]
};
} else if (offsets.length == 1) {
} else if (topLeftOffsets.length == 1) {
return {
top: offsets[0],
left: offsets[0]
top: topLeftOffsets[0],
left: topLeftOffsets[0]
};
} else {
throw Error('Invalid offsets specified. Please follow format <x, y> or <n>');
Expand Down
6 changes: 2 additions & 4 deletions src/core/style/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,15 @@
}


/* mixin definition ; sets LTR and RTL within the same style call */
// mixin definition ; sets LTR and RTL within the same style call
@mixin rtl($prop, $value, $rtl-value) {
#{$prop}: $value;
html[dir=rtl] & {
#{$prop}: $rtl-value;
}
}

/**
* Position a FAB button.
*/
// Position a FAB button.
@mixin fab-position($spot, $top: auto, $right: auto, $bottom: auto, $left: auto) {
&.md-fab-#{$spot} {
top: $top;
Expand Down