From 25833da07403ac83fb989e1b9737dfbcc17fe5db Mon Sep 17 00:00:00 2001 From: cloud Date: Thu, 3 Nov 2022 05:05:59 +0800 Subject: [PATCH] 0.2 --- .editorconfig | 49 ------- Gemfile | 2 - Gemfile.lock | 31 ----- LICENSE | 21 --- flexbox-playground.sublime-project | 11 -- gulpfile.js | 61 --------- source/index.html | 205 ----------------------------- source/javascript/app.js | 45 ------- source/sass/style.scss | 113 ---------------- 9 files changed, 538 deletions(-) delete mode 100644 .editorconfig delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 LICENSE delete mode 100644 flexbox-playground.sublime-project delete mode 100644 gulpfile.js delete mode 100644 source/index.html delete mode 100644 source/javascript/app.js delete mode 100644 source/sass/style.scss diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 61617be..0000000 --- a/.editorconfig +++ /dev/null @@ -1,49 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# Howto with your editor: -# Sublime: https://github.com/sindresorhus/editorconfig-sublime - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[**] -end_of_line = lf -insert_final_newline = true - -# Standard at: https://github.com/felixge/node-style-guide -[**.js, **.json] -trim_trailing_whitespace = true -indent_style = space -indent_size = 2 -max_line_length = 80 -quote_type = single -curly_bracket_next_line = false -spaces_around_operators = true -space_after_control_statements = true -space_after_anonymous_functions = false -spaces_in_brackets = false - -# https://github.com/jedmao/codepainter -[node_modules/**.js] -codepaint = false - -# No Standard. Please document a standard if different from .js -[**.yml, **.html, **.css] -trim_trailing_whitespace = true -indent_style = space -indent_size = 2 - -# No standard. Please document a standard if different from .js -[**.md] -indent_style = space - -# Standard at: -[**.py] -indent_style = space -indent_size = 4 - -# Standard at: -[Makefile] -indent_style = tab -indent_size = 8 diff --git a/Gemfile b/Gemfile deleted file mode 100644 index de8c23e..0000000 --- a/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gem 'compass' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index b146465..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,31 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - chunky_png (1.3.4) - compass (1.0.3) - chunky_png (~> 1.2) - compass-core (~> 1.0.2) - compass-import-once (~> 1.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - sass (>= 3.3.13, < 3.5) - compass-core (1.0.3) - multi_json (~> 1.0) - sass (>= 3.3.0, < 3.5) - compass-import-once (1.0.5) - sass (>= 3.2, < 3.5) - ffi (1.9.8) - multi_json (1.11.1) - rb-fsevent (0.9.5) - rb-inotify (0.9.5) - ffi (>= 0.5.0) - sass (3.4.15) - -PLATFORMS - ruby - -DEPENDENCIES - compass - -BUNDLED WITH - 1.10.1 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 12bca17..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Dimitar Stojanov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/flexbox-playground.sublime-project b/flexbox-playground.sublime-project deleted file mode 100644 index 710c137..0000000 --- a/flexbox-playground.sublime-project +++ /dev/null @@ -1,11 +0,0 @@ -{ - "folders": - [ - { - "follow_symlinks": true, - "path": ".", - "folder_exclude_patterns": ["node_modules", ".sass-cache", ".git"], - "file_exclude_patterns": ["*.sublime-workspace"] - } - ] -} diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 2d85551..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,61 +0,0 @@ -var gulp = require('gulp'), - gutil = require('gulp-util'), - - jshint = require('gulp-jshint'), - compass = require('gulp-compass'), - concat = require('gulp-concat'), - uglify = require('gulp-uglify'), - - input = { - 'html': 'source/*.html', - 'sass': 'source/sass/**/*.scss', - 'javascript': 'source/javascript/**/*.js' - }, - - output = { - 'html': 'dist', - 'stylesheets': 'dist/css', - 'javascript': 'dist/js' - }; - -/* run javascript through jshint */ -gulp.task('jshint', function() { - return gulp.src(input.javascript) - .pipe(jshint()) - .pipe(jshint.reporter('jshint-stylish')); -}); - -/* concat javascript files, minify if --type production */ -gulp.task('build-js', function() { - return gulp.src(input.javascript) - .pipe(concat('app.js')) - //only uglify if gulp is ran with '--type production' - .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop()) - .pipe(gulp.dest(output.javascript)); -}); - -/* compile scss files */ -gulp.task('build-css', function() { - return gulp.src(input.sass) - .pipe(compass({ - css: 'dist/css', - sass: 'source/sass' - })) - .pipe(gulp.dest(output.stylesheets)); -}); - -/* copy any html files to dist */ -gulp.task('copy-html', function() { - return gulp.src(input.html) - .pipe(gulp.dest(output.html)); -}); - -/* Watch these files for changes and run the task on update */ -gulp.task('watch', function() { - gulp.watch(input.javascript, ['jshint', 'build-js']); - gulp.watch(input.sass, ['build-css']); - gulp.watch(input.html, ['copy-html']); -}); - -/* run the watch task when gulp is called without arguments */ -gulp.task('default', ['jshint', 'build-js', 'build-css', 'copy-html', 'watch']); diff --git a/source/index.html b/source/index.html deleted file mode 100644 index 9de2722..0000000 --- a/source/index.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - CSS3 Flexbox Playground - - - - - - - - - -
-
-

Children Width

-
-
width: {{children_width}}%
- -
- - - -

Parent Flex Properties – flex container

-
-
-
- flex-direction - - row - row-reverse - column - column-reverse - -
- -
- flex-wrap - - nowrap - wrap - wrap-reverse - -
-
- -
-
- justify-content - - flex-start - flex-end - center - space-between - space-around - -
- -
- align-items - - stretch - flex-start - flex-end - center - baseline - -
-
- -
-
- align-content - - stretch - flex-start - flex-end - center - space-between - space-around - -
-
-
- - * The default property values are highlighed. - - - -

Children Flex Properties – flex items

- -
-

The children flex properties can be applied at child level, separate for each child. See the results section and change some of their properties. Hover with the mouse pointer or touch the fields to see the property name.

-
- - -
- -
-

Result

-

- Add child -

- -
- -
-
-
- {{$index + 1}} - - ✖ - -
- -
- - order - - - - - flex-grow - - - - - flex-shrink - - - - - flex-basis - - - - - align-self - - {{value}} - - -
- -
-
-
-
-
- - - - - - - - - - - - - diff --git a/source/javascript/app.js b/source/javascript/app.js deleted file mode 100644 index f3f3766..0000000 --- a/source/javascript/app.js +++ /dev/null @@ -1,45 +0,0 @@ -// Declare the flexboxDemoApp module and its dependency 'ngMaterial' -var app = angular.module('flexboxDemoApp', ['ngMaterial']); -// Declare the AppCtrl controller -app -.config(['$mdThemingProvider', function ($mdThemingProvider) { - $mdThemingProvider - .theme('default') - .accentPalette('amber', { - default: '700' - }); -}]) -.controller('AppCtrl', ['$scope', function ($scope) { - $scope.parent = { - flexDirection: 'row', - flexWrap: 'nowrap', - justifyContent: 'flex-start', - alignItems: 'stretch', - alignContent: 'stretch' - }; - - $scope.children_width = 12; // % - - $scope.children = []; - - var addChild = function (order, flexGrow, flexShrink, flexBasis, alignSelf) { - $scope.children.push({ - order: order || 0, - flexGrow: flexGrow || 0, - flexShrink: flexShrink || 1, - flexBasis: flexBasis || 'auto', - alignSelf: alignSelf || 'auto' - }); - }; - var removeChild = function (index) { - $scope.children.splice(index, 1); - }; - - $scope.addChild = addChild; - $scope.removeChild = removeChild; - - for (var i = 0; i < 5; i++) { - addChild(); - } - -}]); diff --git a/source/sass/style.scss b/source/sass/style.scss deleted file mode 100644 index e737acb..0000000 --- a/source/sass/style.scss +++ /dev/null @@ -1,113 +0,0 @@ -@import "compass"; - -// Flex container -.flexbox-parent { - @include display-flex; - background: #FFD54F; - overflow: hidden; - width: 100%; - padding: 3px; - min-height: 550px; - max-height: 1000px; - width:50vw; - max-width:50vw; - height:50vh; - - // Flex items - > div { - display: inline-block; - background: white; - overflow: hidden; - margin: 3px; - padding: 5px; - - .child-controls { - margin-top: 7px; - } - } -} - -.child-number { - display: block; - width: 22px; - height: 22px; - background: #FFB300; - color: white; - font-size: 14px; - font-weight: bold; - padding-top: 3px; - text-align: center; - @include border-radius(50%); - float: left; -} - -.code { - font-family: Consolas, "Courier New", Monospace; - font-size: 15px; -} - -.remove-child { - background: transparent; - color: #FF6F00; - font-size: 14px; - cursor: pointer; -} - -.highlight { - color: #FF8F00; -} - -.pull-left { - float: left; -} - -.pull-right { - float: right; -} - -.clearfix { - &:after { - content: ''; - display: block; - clear: both; - } -} - -.right-padding { - padding-right: 15px; -} - -h3 { - margin: 0 0 10px 0 !important; -} - -p { - margin: 0 0 10px 0 !important; - line-height: 1.4em !important; -} - -md-input-container { - padding: 0 0 5px 0 !important; - - .md-input { - padding: 0 !important; - line-height: 1em !important; - } -} - -md-select { - margin-top: 0 !important; - - .md-select-label { - padding-top: 2px !important; - padding-bottom: 4px !important; - } -} - -md-radio-button { - margin: 5px 10px !important; -} - -md-divider { - margin: 10px 0 !important; -}